// loops/line-of-stars-up.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 i up from 1 to n.
int i = 1; // Initialize counter.
while (i <= n) { // Test counter.
cout << "*";
i++; // Increment counter.
}
cout << endl;
}
system("pause");
}
0 Comments