Advertisement

05 Calculate the floating-point score.

阅读量:

总时间限制: 1000ms 内存限制: 65536kB
描述
给定两个整数a与b,分别作为分子和分母构成分数 a/b ,要求计算其对应的浮点数值(双精度浮点数,小数点后需保留9位)

输入
输入内容仅包含一行,其中包含两个整数a和b(且b不等于零)
输出
输出结果也仅包含一行,即分数 a/b 所对应的浮点数值(双精度浮点数,小数点后保留9位)
样例输入

复制代码
    5 7
    
    
      
    
复制代码
714285714
    
    
      
    
复制代码
    #include<stdio.h>
    #include<stdlib.h>
    #pragma warning(disable:4996)
    
    int main()
    {
    	int a, b;
    	scanf("%d %d", &a, &b);
    	printf("%.9lf", a * 1.0 / b);
    	return 0;
    }
    
    
      
      
      
      
      
      
      
      
      
      
      
    

***_**感

全部评论 (0)

还没有任何评论哟~