lineOfStarsDown.cpp

// loops/line-of-stars-down.cpp - Read int and print that many stars on a line.
// Fred Swartz = 1003-08-23

#include <iostream>
using namespace std;

int main() {
int n;
while (cin >> n) {
//--- Loop counting n down to 0.
while (n > 0) {
cout << "*";
n--;
}
cout << endl;
}
system("pause");
}

Post a Comment

0 Comments