Print the number series 10 100 1000 using for loop in C++
for Loop - Question 3
In this question, we will see how to print the number series 10 100 1000... in C++ programming using for loop. To know more about for loop click on the for loop lesson.
Q3) Write a program in C++ to print the number series given below using for loop.
10 100 1000 10000 100000
Program
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int i;
for(i=10; i<=100000; i=i*10)
{
cout<<i<<" ";
}
return 0;
}
Output
10 100 1000 10000 100000