- 博客(6)
- 收藏
- 关注
原创 2个数的和
#include <stdio.h> int main () { int a; int b; int c; scanf("%d %d",&a,&b); c=a+b; printf("%d\n",c); return 0; }
2020-03-13 21:30:35
113
原创 switch选择结构
#include <stdio.h> #include <stdlib.h> int main () { double flowerprice; printf(“在一个月黑风高的夜晚\n”); printf(“一个小男生用自己的零花钱给小女生买了一束鲜花”); printf(“小女生问小男生花的价钱:\n“这花多少钱?””); printf(“小男生答:”); scanf(...
2020-03-12 19:38:07
106
原创 if语句的应用
#include <stdio.h> #include <stdlib.h> int main () { double price1 = 262.7; double price2 = 3215; double price3 = 24836; double total =price1 + price2 + price3; double zhekou; //折扣 ...
2020-03-11 11:44:12
312
原创 随堂练习
#include <stdio.h> #include <stdlib.h>在这里插入代码片 int main () { double factshanghai; //武器实际最大伤害 int strength; //玩家力量 double maxshanghai = 256; //武器最大伤害 printf("请玩家输入当前角色的力量:"); //&取地址...
2020-03-10 20:40:27
139
原创 声明和使用变量
#include <stdio.h> #include <stdlib.h> int main() { int num1=10, num2=8; printf("%d口心思, 思君思国思杜稷\n%d目共赏, 赏花赏月赏秋香!\n",num1,num2); 在这里插入代码片 float a =5.0f; float b =6.0f; float x =2.0f; float...
2020-03-09 19:10:32
131
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅