move to repo.or.cz
[letusc.git] / ch3 / examples / exa13.c
bloba1e8d98360524d7f501cdc2d56c459d6fed8da93
1 /*Execution of a loop an unknown number of times*/
3 #include<stdio.h>
5 int main()
7 char another='y';
8 int num;
9 do{
10 printf("Enter a number:");
11 scanf("%d",&num);
12 printf("Square of %d is %d\n",num,num*num);
14 printf("Want to enter another number Y/n:");
15 scanf("%c",&another);
16 }while(another=='y');
18 return 0;