my codes: #includeiostream #include cstdio using namespace std; int main(){ int a,b; while (~scanf( " %d%d " ,a, b)) { int afterdot_1=(a* 10 )/b; // 计算a除b的第一位小数. printf( " %d\n " ,afterdot_1); } return 0 ; }
my codes:
#include<iostream> #include<cstdio> using namespace std; int main() { int a,b; while(~scanf("%d%d",&a,&b)) { int afterdot_1=(a*10)/b;//计算a除b的第一位小数. printf("%d\n",afterdot_1); } return 0; }