repo.or.cz
/
letusc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
move to repo.or.cz
[letusc.git]
/
ch3
/
examples
/
exa13.c
blob
a1e8d98360524d7f501cdc2d56c459d6fed8da93
1
/*Execution of a loop an unknown number of times*/
2
3
#include<stdio.h>
4
5
int
main
()
6
{
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
);
13
14
printf
(
"Want to enter another number Y/n:"
);
15
scanf
(
"%c"
,&
another
);
16
}
while
(
another
==
'y'
);
17
18
return
0
;
19
}