using namespace std;
int main()
{
double product = 1; // otherwise it'll all be 0
double n;
double sum;
cout << "Enter a number:\t";
cin >> n;
while (product <= n)
product *= 10;
for (double i = 0; i < n; i++)
{
product*10;
}
cout << n << " is smaller than the number " << product << endl;
do {
product *= 10;
cout << "So is: " << product << endl;
} while (product < 1000);
return 0;
}
No comments:
Post a Comment