Using C create a pyramid that a has square base Create an im

Using C++, create a pyramid that a has square base. Create an image using gnuplot.
Using C++, create a pyramid that a has square base. Create an image using gnuplot.

Solution

#include<iostream.h>

#include<conio.h>

void main()

{

int i,j,k;

clrscr();

for(i=1; i<=5; i++)

{

for(j=4; j>=i; j--)

{

cout<<\" \";

}

for(k=1; k<=(2*i-1); k++)

{

cout<<\"*\";

}

cout<<\"\ \";

}

getch();

}

 Using C++, create a pyramid that a has square base. Create an image using gnuplot. Using C++, create a pyramid that a has square base. Create an image using gn

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site