题目
qq_36239092
这个作者很懒,什么都没留下…
展开
-
hdu 2002计算球体积
Problem Description根据输入的半径值,计算球的体积。 Input输入数据有多组,每组占一行,每行包括一个实数,表示球的半径。 Output输出对应的球的体积,对于每组输入数据,输出一行,计算结果保留三位小数。 Sample Input11.5 Sample Output4.18914.137Hint#define PI 3.1415927#include <st...原创 2018-05-27 10:02:26 · 132 阅读 · 0 评论 -
hdu 2003绝对值
Problem Description求实数的绝对值。 Input输入数据有多组,每组占一行,每行包含一个实数。 #include <stdio.h>int main(){ double r; while( scanf("%lf", &r) != EOF){ if(r > 0) printf("%.2lf\n", r); else printf...原创 2018-05-27 10:24:38 · 75 阅读 · 0 评论 -
hdu2004成绩转换
#include <cstdio>int main() { int t; while (scanf("%d", &t) != EOF) { if(t < 0 || t > 100) printf("Score is error!\n"); else if (t &g...原创 2018-05-27 10:50:25 · 106 阅读 · 0 评论 -
hdu2000 ASCII码排序
输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。 Input 输入数据有多组,每组占一行,有三个字符组成,之间无空格。 Output 对于每组输入数据,输出一行,字符中间用一个空格分开。 Sample Input qwe asd zxc Sample Output e q w a d s c x z#include <stdio.h>int main(){ ...原创 2018-05-23 22:55:46 · 65 阅读 · 0 评论 -
hdu 2001计算两点之间的距离
#include <stdio.h>#include <math.h>int main(){ double n, m; double x1, y1, x2, y2; while(scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2) != EOF){ n = (x1 - x2) *...原创 2018-05-24 22:59:21 · 77 阅读 · 0 评论