# Answer to Question #24166 in C++ for mike nelson

Question #24166

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

Expert's answer

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

}

#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