Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int choice;
- int i; int j; int k;
- int space;
- cout << "give me a diamond size= ";
- cin >> choice;
- /*space = choice - 1;
- for (k = 1; k <= choice; k++)
- {
- for (i = 1; i <= space; i++)
- {
- cout << " ";
- }
- space--;
- for (j = 1; j <= (2 * i - 1); j++)
- {
- cout << "*";
- }
- cout << endl;
- }
- cout << endl; // L\1ine break
- }//end outer loop*/
- for (i = choice; i > 0; i--) {
- for (j = 1; j <= i; j++) {
- cout << "*";
- }
- cout << endl;
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement