level 3
我们知道要求圆的半径是直径的一半。现在,我们知道一个圆的半径r,请求出这个圆的直径d。
输入一行,一整数r(1<=r<=1000),代表圆的半径。
输出一行,为圆的直径d。
AC:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main(void)
{ int r,d;
scanf("%d",&r);
d=r*2;
printf("%d",d);
return 0;
}
2022年10月20日 07点10分
1