C
- @ignis_fatuus
- ブン
- @Linda_pp
- 清楚なC++メイドBOT
- @tzik_tack
- 長谷川一輝
- wraith13
- @jj1bdx
- @cpp_akira
- 安藤敏彦
- @srz_zumix
- Siv3D
- @okdshin
- @hnokx
- @ishidakei
- @take_cheeze
- TAKEI Yuya
- @mumumu
- I (@wx257osn2)
- Tommy6
- わたやん
- @KorekaraSEDB
- @kariya_mitsuru
- @ciniml
- @beam2d
- @grafi_tt
- @nekketsuuu
- LouiS0616
- @volanja
- 大鎌広
- むてら
- ガチKGB
- 三重野賢人
x
18
1
2
3
long get_long(const char* s) {
4
long r = 0;
5
puts(s);
6
scanf("%ld", &r);
7
return r;
8
}
9
10
int main(void) {
11
long stars;
12
do {
13
stars = get_long("How many stars can you count? ");
14
} while (stars < 100);
15
printf("%ld\n", stars);
16
return 0;
17
}
18
$ gcc prog.c -Wall -Wextra -std=gnu11
Stdin
10
20
100
500
Start
How many stars can you count? How many stars can you count? How many stars can you count? 100
0
Finish