- 博客(21)
- 收藏
- 关注
原创 【无标题】学c打卡
现在有t升肥宅快乐水,要均分给n名同学。每名同学需要2个杯子。现在想知道每名同学可以获得多少升饮料(严格精确到小数后3位),以及-共需要多少个杯子。输入一个实数t和一个整数n,使用空格隔开。输出两个数字表示答案,使用换行隔开。输入一个小写字母,输出其对应的大写字母。例如输入qI回车]时,会输出Q.#include <stdio.h>int main(){ float a,c; int b,d; scanf("%f %d",&a,&b); c=a/b; d=b*
2022-03-26 23:16:49
467
原创 学c打卡
输入一个球的半径,求球的体积#include <stdio.h>#include <math.h>#define PI 3.14int main(){ float r,V; scanf("%f",&r); V=(4*pow(r,3)*PI)/3; printf("%f\n",V); } 求一元二次方程的两个根#include <stdio.h>#include <math.h>int main(){ float
2022-03-23 15:35:51
115
原创 学C打卡
#include <stdioh>int main(){ char a='B',b='Q',c='Y'; //定义3个字符变量并初始化 putcher(a); //向显示器输出字符B putcher(b); //向显示器输出字符O putcher(c); //向显示器输出字符Y putcher('\n').
2022-03-18 23:19:44
127
原创 【无标题】
#include <stdio.h>#include <stdlib.h> //standard library标准库头文件,里面定义了五种类型、一些宏观和通用工具 函数,一般自己定义函数时可以加上 int main(){ double a; //定义变量 scanf("%lf",&a); //输入小数给a复制 if(a>1) .
2022-03-16 22:46:00
597
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人