answersLogoWhite

0

C program that create a pyramid?

User Avatar

Anonymous

15y ago
Updated: 8/17/2019

here is the solution of ur answer.. :)

# include<iostream.h>

# include <conio.h>

main()

{

int space=10; \\ to print the pyramid in center, you can also increase the # of spaces

for (int i=0;i<=5;i++)

{

for (int k=0;k<space;k++)

{

cout<<" ";

}

for (int j=0;j<2*i-1;j++)

{

cout<<"*";

}

space--;

cout<<endl;

}

getch();

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

C program on left factoring in compiler design?

how to create a c program for left factoring.


How you create c program without semicolon?

int main () {}


How do you write a C plus plus program that displays a pyramid of Xes on the screen using a for loop?

printf ("x")


How you can make c program of attendance record system?

how can create a attendece sheet in c language


Write a program in C to create a Circular Linked list?

#include&lt;iostream.h&gt;


How can you create a c program without using header file?

C programs do not require header files. If you want a C program without header files, you can simply not create them. However, you may or may not be able to include your non-header file source files.


How do you easily create Excel files in c?

You might be able to use C to extract data from an Excel file, but there is no easy way to write a program to create an Excel file.


How can I create a pyramid hologram?

To create a pyramid hologram, you will need a smartphone or tablet, a clear plastic pyramid, and a hologram video. Place the pyramid on top of the screen with the video playing, and the 3D hologram will be projected inside the pyramid.


What does the hashtag mean in programming?

In programming, specifically in C and C++, the hashtag (#) is used to include files into the main program and to create macros.


How do you create program of reverse pyramid in c?

#include&lt;stdio.h&gt; main() { int i,j; for(i=0;i&lt;10;i++)//replace 10 by any no. you need { for(j=i;j&gt;0;j--) { printf(" "); } for(j=10-i;j&gt;0;j--)//here also printf("* "); printf("\n"); } }


Which teotihuacan pyramid faces the sunset on August 12?

C. Pyramid of the Sun


Where was the first pyramid built and who was it bult for?

The first pyramid was the stepped pyramid of Zoser. It can be seen in Saqqara, Egypt. It was built c.4770 years ago. The first smooth-faced pyramid was built for Snefru in c. 2620BC.