暮夜yorikoの小站

  • 首页
  • C语言实践代码
  • 关于

thumbnail of the cover of the post

输入一个三位数并分别输出他的百位、个位、十位是什么

#include <stdio.h> int main() { int a; printf("输入一个三位数: "); scanf_s("%d", &a); //读取一个数字 if (a >= 100 && a <= 999) //判断数字是否为三位数 { int ba


thumbnail of the cover of the post

题目:按照下列函数输出结果,要求用嵌套if语句

𝑓(𝑥) = −1,x<0; 𝑓(𝑥) = 0,x=0; 𝑓(𝑥) = 1,x>0; #include <stdio.h> int main() { int x,y; printf("Enter two integers: "); scanf_s("%d", &x); if(


thumbnail of the cover of the post

题目:给出一个百分制成绩,按照要求给成绩划分A、B、C、D、E等级

给出一百分制成绩,要求输出成绩等级’A’、’B’、’C’、’D’、’E’。90 分以上为‘A’,80~89 为‘B’,70~79 为‘C’,60~69 为‘D’, 60 分以下为‘E’。用 switch 语句实现。 else if不比switch好用吗!? #include <stdio.h> in


thumbnail of the cover of the post

题目:输入学生的三门课成绩并用if判断是否合规,若合规输出平均分与总分

#include <stdio.h> int main() { printf("请输入学生的数学,英语,C语言成绩,以空格分隔:"); double math, english, c_language; scanf_s("%lf %lf %lf", &math, &english, &c_la


thumbnail of the cover of the post

题目:有 3 个整数 a,b,c,由键盘输入,输出其中最大的数


site logo

Ciallo~(∠・▽< )⌒☆

  • 首页
  • C语言实践代码
  • 关于

© 2025 暮夜yorikoの小站

Powered by Halo • Crafted with by LIlGG

© 2025 暮夜yorikoの小站

晋ICP备2025067824号