一只大象口渴了,要喝20升水才能解渴,但现在只有一个深h厘米,底面半径为r厘米的小圆桶(h和r都是整数) 。问大象至少要喝多少桶水才会解渴。 (设PAI=3.14159) 输入一行:小圆桶的深h,和底面半径r,单位都是厘米。 输出两行:第一行提示输入语句; 第二行为大象至少要喝水的桶数。 输入输出样例:输入:23,11 输出:please input the height and the radius:3
#include <stdio.h> int main() { int n,h,r; float v,PAI=3.14159; scanf("%d,%d",&h,&r); v=PAI*r*r*h; n=v/2500; printf("please input the height and the radius:\n%d",n); return 0; } 请问这样写对吗???