#include<stdio.h> int main() { printf(" 0\n"); printf("<H>\n"); printf("I I\n"); printf(" 0\n"); printf("<H>\n"); printf("I I\n"); }
#include<stdio.h> int main() { printf(" o"); printf(" o\n"); printf("<H>"); printf(" <H>\n"); printf("I I"); printf(" I I\n"); return 0; }
#include<stdio.h> int main() { double f, c; while (scanf_s("%lf", &c) != EOF) { f = c * 9 / 5 + 32; printf("摄氏度c=%lf时,华氏度f=%lf", c, f); printf("\n"); } return 0; }
#include<stdio.h> #include<math.h> int main() { double n, sum = 0, a, b, c=1,d; scanf_s("%lf", &n); a = n - 1; b = pow(2, a); while (c <= b) { sum = sum + c; c = c * 2; } printf("%lf", sum); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> int main() { double x, y; char c1, c2, c3; int a1, a2, a3; scanf("%d%d%d",&a1,&a2,&a3); printf("a1=%d,a2=%d,a3=%d\n", a1, a2, a3); scanf("%c%c%c", &c1,&c2,&c3); printf("%c%c%c\n", c1, c2, c3); scanf("%lf,%lf", &x, &y); printf("%lf,%lf\n", x, y); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { int age1, age2; char gender1, gender2; scanf("%d%c%d%c", &age1, &gender1, &age2, &gender2); printf("age1=%d,gender1=%c\n", age1, gender1); printf("age2=%d,gender2=%c\n", age2, gender2); return 0; }
#include<stdio.h> int main() { char ans1, ans2; printf("每次课前认真预习、课后认真复习了没有?(输入Y或y表示有,输入N或n表示没有):"); ans1 = getchar(); getchar(); printf("\n动手敲代码实践了没?(输入Y或y表示敲了,输入N或n表示木有敲):"); ans2 = getchar(); getchar(); if (ans1!='N'&&ans2!='n') printf("/n罗马不是一天建成的,继续保持哦:)\n"); else printf("\n罗马不是一天毁灭的,我们来建设吧\n"); return 0; }
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<stdlib.h> int main() { int answer; char words[5000]; printf("网课学习让一些人欢喜一些人担忧\n"); printf("1.作为喜欢自学且自律的人,觉得这样很好,有网络,自主学习,很ok.\n"); printf("2.不喜,不喜,很不喜,眼睛都快瞎了。脑阔有点卡。。。\n"); printf("3.中间派。不知道。说不清。\n"); printf("你的选择:"); scanf("%d", &answer); if (answer==4) { printf("请补充说明你的想法:\n"); getchar(); gets_s(words); } printf("\n"); printf("当遇到问题时,你会选择:\n"); printf("1.遇到问题,就会解决问题。不懂的,搜索学习,逐个攻破。\n"); printf("2.遇到问题,不高兴。然后,。。。,没有了。\n"); printf("3.其他。。。\n"); printf("你的选择:"); scanf("%d", &answer); if (answer == 1) printf(":)"); else if (answer == 2) printf("这样不能解决问题啊。。。我们选择1好不好:)/n"); else if (answer == 3) { printf("请补充说明你的想法:\n"); getchar(); gets_s(words); } return 0; }
标签:lf,main,int,scanf,实验,printf,include From: https://www.cnblogs.com/hddxmg/p/16789999.html