Learn C With Me Beginners C Tutorial While Loop

July 19th, 2012 | No Comments | Posted in Programming

w.a.p to display your name 5 times
#include
#include
void main()
{
int i=1;
clrscr();
while(i {
printf("Type Your Name In This Place\n");
i++;
}
getch();

}
//w.a.p to find the sum of 10 numbers using while loop//
#include
#include
void main()
{
int i=1,sum=0;
clrscr();
while(i {
sum=sum+i;
i++;
}
printf(“Result is : %d”,sum);
getch();

}

Leave a Reply 79 views, 2 so far today |

Most Commented Posts

Leave a Reply

CAPTCHA Image
Refresh Image
*