思路

凌愉晴  •  11天前


不给题解给思路

这题得用double或者float,先定义三个数,然后cin,再cout三十减这三个数就可以了。很简单,不用题解吧


评论:

算了给吧

#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b,c,d;
	cin>>a>>b>>c;
	cout<<30-a-b-c;
}

或者

#include<bits/stdc++.h>
using namespace std;
int main(){
	double a,b,c,d;
	cin>>a>>b>>c;
	d=30-a-b-c;
	cout<<d;
}

再或者

#include<bits/stdc++.h>
using namespace std;
int main(){
	float a,b,c,d;
	cin>>a>>b>>c;
	d=30-a-b-c;
	cout<<d;
}

凌愉晴  •  11天前

只供参考,抄题解无耻


凌愉晴  •  11天前