Write a program in c to draw a star and rotate it?

1 answer

Answer

1006169

2026-05-16 04:55

+ Follow

// 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;

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.