错哪了,咋也是70分,小白无助
查看原帖
错哪了,咋也是70分,小白无助
1439376
wang0212楼主2024/9/4 22:44
#include <stdio.h>

int main()
{
   int n,count=0,h,a,b;
   double c,m=1;
   scanf("%d %d %d",&a,&b,&n);
   
   c=(double)a/b;
   while(count<n){
   	m*=10;
   	count++;
   }
   c*=m;
   h=(int)c%10;
   printf("%d\n",h);
   
   return 0;
}
2024/9/4 22:44
加载中...