摘要: #include <stdio.h> int main(int argc, char **argv) { //定义三个变量 x n s ,n s的初始值为1; int x; int n=1; int s=1; //输入要乘的次数 变量x代表 ; scanf("%d",&x); //进入for 初始动 阅读全文
posted @ 2018-11-10 15:29 李可爱喝可乐 阅读(152) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //定义两个变量 x 跟 n,n的初始化为0; int x; int n=0; //输入x的值; scanf("%d",&x); //开始循环 每一轮x都要被处以10 n加上1,先开始执行循环体 阅读全文
posted @ 2018-11-10 15:10 李可爱喝可乐 阅读(131) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //定义两个变量 x n 把n初始化 int x; int n=0; //输入x scanf("%d",&x); // x小于0的时候进入循环 每一次循环n的值都要加1 x的值都要处以10 wh 阅读全文
posted @ 2018-11-01 19:36 李可爱喝可乐 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { // int x; int n=0; scanf("%d",&x); // n++; x/=10; // while(x>0){ n++; x/=10; } // printf("%d\n",n 阅读全文
posted @ 2018-10-30 10:47 李可爱喝可乐 阅读(268) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { // 新建两个变量 pass代表及格分数的固定变量 score代表学生成绩的一个整数变量 const int pass=60; int score; //输出 一句话 printf("请输入成绩 阅读全文
posted @ 2018-10-28 13:49 李可爱喝可乐 阅读(1242) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //新建三个变量进行比较 int a,b,c; //输入三个变量的值scanf("%d %d %d",&a,&b,&c);int max=0;//进行判断 假如 a大于b (则执行下一个判断a是 阅读全文
posted @ 2018-10-28 13:33 李可爱喝可乐 阅读(709) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //定义四个变量 g每小时固定的工资 40 固定工作时间 pay工资 hours员工的实际工作时间 const double g=9; const int s=40; double pay=0. 阅读全文
posted @ 2018-10-28 12:48 李可爱喝可乐 阅读(456) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //新建两个变量给变量赋值跟初始化;const int a=45;int c=0; //给与提示和输出名字;printf("请输入你的姓名:");scanf("%d",&c);printf("你 阅读全文
posted @ 2018-10-28 09:30 李可爱喝可乐 阅读(612) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int main(){ //新建四个变量 la 代表小时 kc代表时间 int l,k,a,c; //输入 两个时间 scanf("%d %d",&l,&k); scanf("%d %d",&a,&c); // 新建两个变量t1代表第一个时间 t2代表第二个时间 阅读全文
posted @ 2018-10-25 09:37 李可爱喝可乐 阅读(517) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int main(int argc, char **argv) { //输出一句话printf("请分别输入身高的英尺和英寸," "如输入\"5 7\"表示5英尺7英寸:"); //新建两个变量 double双精度 foot代表英尺 inch代表英寸 doubl 阅读全文
posted @ 2018-10-25 09:19 李可爱喝可乐 阅读(574) 评论(1) 推荐(1) 编辑