KR Code Corner
Friday, 22 May 2015
How to print numbers from 1-10 in do while loop in c++
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i;
cout<<"Numbers from 1-10!";
i=1;
do
{
cout<<"\n"<<i;
i++;
}
while(i<=10);
getch();
}
Coding Format
Output Format
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment