Serendi_Pity @ 2022-08-29 21:23:33
#include<iostream>
using namespace std;
int main(){
int a;
double b=1,c=1;
cin>>a;
while(c<=a){
b+=1/c;
c++;
}
cout<<b;
return 0;
}
by NastiY_iN_saNitY @ 2022-08-29 21:26:32
你输出double类干什么
by NastiY_iN_saNitY @ 2022-08-29 21:26:49
不是让你输出正整数吗
by Serendi_Pity @ 2022-08-29 21:27:59
@Frustrated_EH 哦,我忘了
瞧这记性
by NastiY_iN_saNitY @ 2022-08-29 21:28:04
这有啥好警告的
by ivyjiao @ 2022-08-29 21:28:48
这有啥好警告的
by Serendi_Pity @ 2022-08-29 21:30:10
@Frustrated_EH 还WA啊
by RP_INT_MAX @ 2022-08-29 21:30:32
这有啥好警告的
by Register_int @ 2022-08-29 21:33:20
这有啥好警告的
by NastiY_iN_saNitY @ 2022-08-29 21:37:07
@sjz520 自己调去,红题没必要求助/警示
by _Give_up_ @ 2022-08-29 21:38:54
这有啥好警告的