answersLogoWhite

0


Best Answer

// asterisk pyramid

#include<iostream>

using namespace std;

int main()

{

int count = 0;

for (int width = 0; width <= 10; width++)

{

for (int alignLeft = width; alignLeft <= 15; alignLeft++)

{

cout << " ";

}

for (int space = 1; space < count; space++)

{

cout << "*";

}

cout << endl;

count += 2;

}

return 0;

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

#include<stdio.h>

main()

{ int n, i, j;

while(1) {

printf("Please enter a number:\n");

scanf("%d",&n);

for( i = 0; i < n; i++)

{

for(j=0; j<i+1; j++)

printf("*");

printf ("\n");

}

printf("This is an extra line ;)\n");

}scanf ("%d", & n);

return 0;

}

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

I don 't this answer

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a program in c to draw a star and rotate it?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program to print numbers from star one and next line star two in php?

Try the triangle program on a search engine. Replace numbers with stars and that should do the trick


What is the name of the star that all stars seem to rotate about?

The North Star!


Does constellation Orion rotate about the pole star?

All the constellations appear to rotate round the pole star because the pole star is in line with the axis that the Earth rotates around with us on board.


How do you draw a seven pointed star?

Draw seven points!


What planets go round the stars?

All 8 planets in our solar system rotate around a star, our sun. Virtually all planets rotate around a star.


How to draw a nautical star?

check out this site... it shows you how to draw a nautical star. hope this helps someone. http://www.dragoart.com/how-to-draw-a-nautical-star-t288-1.htm go die in a hole


What star does not spin?

All stars rotate (spin). Some spin faster than others, but all stars will rotate as without this rotation, the star will literally fall into space.


How does the big dipper rotate around the north star?

Not just the big dipper but all of the stars appear to rotate around the North Star because Earth is rotating. The North Star does not appear to move because it is in line with Earth's axis of rotation.


How might one draw a perfect star?

There are a few different types of star that can be drawn including a six pointed star and a five pointed star. Generally the best was to draw a perfect star is either with a lot of practice or to use a stencil.


What powers a star?

Box office draw.


How does the big dipper rotate?

The Big Dipper seems to rotate around the north star, this due to the Earth's rotation, not an actual movement of the stars.


How do you rotate the rotator in escape the death star?

easy you go up to it and push on it