#include<stdio.h>intmain(){
printf("Practice makes perfect!\n");return0;}
BC2 我是大V
#include<stdio.h>intmain(){
printf("v v\n v v \n v \n");return0;}
BC3 有容乃大
#include<stdio.h>intmain(){
printf("The size of short is %d bytes.\n",sizeof(short));printf("The size of int is %d bytes.\n",sizeof(int));printf("The size of long is %d bytes.\n",sizeof(long));printf("The size of long long is %d bytes.\n",sizeof(longlong));}
#include<stdio.h>intmain(){
long a;float C, M, E;scanf("%ld;%f,%f,%f",&a,&C,&M,&E);printf("The each subject score of No. %ld is %.2f, %.2f, %.2f.", a, C, M, E);return0;}
#include<stdio.h>intmain(){
int arr[]={
73,32,99,97,110,32,100,111,32,105,116,33};int size =sizeof(arr)/sizeof(arr[0]);for(int i =0; i < size; i++){
printf("%c", arr[i]);}return0;}
BC14 出生日期输入输出
#include<stdio.h>intmain(){
int year;int month;int day;scanf("%4d%2d%2d",&year,&month,&day);printf("year=%d\nmonth=%02d\ndate=%02d\n", year, month, day);return0;}
BC15 按照格式输入并交换输出
#include<stdio.h>voidJH(int*a,int*b);intmain(){
int a;int b;scanf("a=%d,b=%d",&a,&b);JH(&a,&b);printf("a=%d,b=%d", a, b);}voidJH(int*a,int*b){
int c =*a;*a =*b;*b = c;}
#include<stdio.h>intmain(){
int high =0, weight =0;scanf("%d %d",&weight,&high);printf("%.2f\n", weight /((high /100.0)*(high /100.0)));return0;}
BC26 计算三角形的周长和面积
#include<stdio.h>#include<math.h>intmain(){
int a, b, c;scanf("%d %d %d",&a,&b,&c);float d, e, p;
d = a + b + c;
p = d /2;
e =sqrt(p *(p-a)*(p-b)*(p-c));printf("circumference=%.2f area=%.2f", d, e);return0;}
BC27 计算球体的体积
#include<stdio.h>#include<math.h>intmain(){
//半径double r =0.0;//体积double v =0.0;double pi =3.1415926;//输入scanf("%lf",&r);//计算
v =4/3.0* pi *pow(r,3);//输出printf("%.3lf\n", v);return0;}
#include<stdio.h>intmain(){
int a[4];int b[4];for(int i =10000; i <=99999; i++){
a[0]= i /10000;
b[0]= i %10000;
a[1]= i /1000;
b[1]= i %1000;
a[2]= i /100;
b[2]= i %100;
a[3]= i /10;
b[3]= i %10;if(i == a[0]* b[0]+ a[1]* b[1]+ a[2]* b[2]+ a[3]* b[3])printf("%d ", i);}return0;}
BC39 争夺前五名
#include<stdio.h>intmain(){
int n;int a[50]={
0};scanf("%d",&n);for(int i =0; i < n; i++){
scanf("%d",&a[i]);}for(int i =0; i <5; i++){
for(int j = i+1; j< n; j++){
if(a[j]> a[i]){
int tmp = a[i];
a[i]= a[j];
a[j]= tmp;}}printf("%d ", a[i]);}}
BC40 竞选社长
#include<stdio.h>intmain(){
char ch;int A =0, B =0, E =0;while((ch =getchar())!='0'){
if(ch =='A')
A++;if(ch =='B')
B++;}if(A == B){
printf("E\n");return0;}int flag = A > B ?0:1;if(flag ==0)printf("A\n");elseprintf("B\n");return0;}
BC41 你是天才吗?
#include<stdio.h>intmain(){
int Genius;while(scanf("%d",&Genius)!=EOF){
if(Genius >=140)printf("Genius\n");}return0;}
BC42 完美成绩
#include<stdio.h>intmain(){
int score;while(scanf("%d",&score)!=EOF){
if(score >=90&& score <=100)printf("Perfect\n");}return0;}
BC43 及格分数
#include<stdio.h>intmain(){
int score;while(scanf("%d",&score)!=EOF){
if(score >=60&& score <=100)printf("Pass\n");elseprintf("Fail\n");}return0;}
BC44 判断整数奇偶性
#include<stdio.h>intmain(){
int n;while(scanf("%d",&n)!=EOF){
if(n %2==0)printf("Even\n");elseprintf(