ask user for a number greater than 100 if the user doesn't follow firections display an error if the number is greater than 200 multiply it by itself and display "your number squared is ##" 50 times on 50 different line
1
Expert's answer
2013-02-13T11:23:27-0500
#include <conio.h> #include <iostream>
using namespace std;
int main() { int number; cout << " Enter a number greater than 100: "; cin >> number;
if (number < 100) cout << " Wrong number."; else if (number > 200) { number *= number; for (char c = 0; c < 50; c++) cout << " Your number squared is " << number << endl; } _getch(); return 0; }
Comments
Leave a comment