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

}

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment