为什么cin能过,而scanf不能过?
查看原帖
为什么cin能过,而scanf不能过?
1142235
zsms1996楼主2023/11/7 22:01

这个过不了?

#include<bits/stdc++.h>
using namespace std;
double f,b;
int main(){
    scanf("%f",&f);
    b=5*(f-32)/9;
    printf("%.5f",b);
	return 0;
}

这个能过?

#include<bits/stdc++.h>
using namespace std;
double f,b;
int main(){
    cin>>f;
    b=5*(f-32)/9;
    printf("%.5f",b);
	return 0;
}
2023/11/7 22:01
加载中...