这一道题主要考的是printf输出%和取位数,废话不多说,上代码!
#include<bits/stdc++.h>
using namespace std;
double a,b,c = 0;
int main(){
scanf("%lf %lf",&a,&b);
c += b / a * 100;
printf("%.3f%%",c);
return 0;
}
这一道题主要考的是printf输出%和取位数,废话不多说,上代码!
#include<bits/stdc++.h>
using namespace std;
double a,b,c = 0;
int main(){
scanf("%lf %lf",&a,&b);
c += b / a * 100;
printf("%.3f%%",c);
return 0;
}