1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-11-23 21:58:41 +00:00
202401-programming-assignments/【额外练习】循环结构/7-7 循环-平方根.c

23 lines
252 B
C
Raw Normal View History

2024-11-18 15:10:07 +00:00
#include <stdio.h>
int main() {
int n;
while (1) {
scanf("%d", &n);
if (n >= 1000) {
break;
}
}
int i = 0;
while (i * i <= n) {
i++;
}
printf("%d\n", i - 1);
return 0;
}