B2012甲流疫情死亡率-题解
YANGRONGYANG1 · · 题解
我们知道公式为:死亡率 = 死亡数 / 确诊数 ×100%=(100× 死亡数 / 确诊数 )% 则输出公式并保留三位小数输出
AC CODE:
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<fixed<<setprecision(3)<<100.0*b/a<<'%';
}
YANGRONGYANG1 · · 题解
我们知道公式为:死亡率 = 死亡数 / 确诊数 ×100%=(100× 死亡数 / 确诊数 )% 则输出公式并保留三位小数输出
AC CODE:
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
cout<<fixed<<setprecision(3)<<100.0*b/a<<'%';
}