#include<iostream>
using namespace std;
int main(){
int i;
for (i=0;i<10;i++)
{
cout<<"The numbers are:"<<i;
}
return 0;
}
Output :
The numbers are:0123456789
Algorithm :
- Initialize the variable
- Use
for
loop syntax to print the numbers
- Print the result finally
Comments :