SIMPLE C++ PROGRAM TO PRINT NUMBER 1 TO USER DEFINED USING for LOOP
C++ programm
GREEN CODE IS MAIN PROGRAM
#include<iostream.h>
void main()
{
int i,n;
cout<<"Enter the value of number till you want to print";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"\n";
cout<<i;
}
for(i=1;i<=n;i++)
{
cout<<"\n";
cout<<i;
}
}
[[ n is that number where you want print numbers 1 to that no.]]
Thanks for visiting...................
0 comments:
Post a Comment