#include<stdio.h> int main() { printf(" O O\n"); printf("<H> <H>\n"); printf("I I I I\n"); }
#include<stdio.h> int main() { printf(" O \n"); printf("<H>\n"); printf("I I\n"); printf(" O \n"); printf("<H>\n"); printf("I I\n"); return 0; }
#include<stdio.h> int main() { int n,sum; scanf("%d", &n); sum = n*(n+1)/2; printf("sum=%d\n",sum); return 0; }
#include<stdio.h> int main() { int a , b, t; a=3; b=4; printf("a=%d, b =%d,\n",a,b); t=a; a=b; b=t; printf("a=%d,b=%d\n", a , b); return 0; }
#include<stdio.h> int main() { int x ,t ,m; x=123; printf("x=%d\n",x); t=0; m=x%10; t=t*10+m; x=x/10; m=x%10; t=t*10+m; x=x/10; m=x%10; t=t*10+m; x=x/10; printf("t=%d\n",t); return 0; }
#include<stdio.h> int main() { float a,b,c; scanf("%f%f%f",&a,&b,&c); if (a+b>c && a-b<c && a+c>b && a-c<b &&b+c>a && b-c<a) printf("能构成三角形\n"); else printf("不能构成三角形\n"); return 0; }
#include<stdio.h> int main() { int year; double n; n = 365*24*60*60; year = 1.0e9 / n; printf("10亿秒约等于 %d 年",year); return 0; }
#include<stdio.h> int main() { int n; n = rand() % 61+40; printf("n = %d",n); return 0; }
#include<stdio.h> int main() { char ans1, ans2; printf("每次课前认真预习,课后及时复习没(输入y或Y表示有,输入n或N表示没有:\n"); ans1 = getchar(); getchar(); printf("动手敲代码实践了没?(输入y或Y表示敲了,输入n或N表示没有):"); ans2 = getchar(); if((ans1 == 'y'||ans1 == 'Y' ) && (ans2 == 'y' || ans2 == 'Y')) { printf("罗马不是一天建成的,继续保持哦:)");} else { printf("罗马不是一天毁灭的,让我们来建设吧");} return 0; }
标签:10,main,return,11111,int,printf,include From: https://www.cnblogs.com/artyug/p/17172831.html