#include<stdio.h> int main(){ int n; scanf("%d",&n); printf("%d",sqrt(n)); }
👆👆👆上为原来的,👇👇👇下为修改之后的!!
修改前报错分别为
2.
#include<stdio.h> int main(){ int n; scanf("%d",&n); printf("%d",(int)sqrt(n)); }
之后就可以了
#include<stdio.h> int main(){ int n; scanf("%d",&n); printf("%d",sqrt(n)); }
#include<stdio.h> int main(){ int n; scanf("%d",&n); printf("%d",(int)sqrt(n)); }
全部评论
(1) 回帖