求两个数的较大值

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int MAX(int x,int y)
{
if (x > y)
return x;
else
return y;
}
int main()
{
int num1 = 0;
int num2 = 0;
scanf("%d %d", &num1, &num2);
int max = MAX(num1, num2);
printf("%d", max);
return 0;
}

BC41-你是天才吗?

1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>
int main()
{
int IQ = 0;
while(scanf("%d", &IQ) != EOF)
{
if (IQ >= 140)
printf("Genius\n");
}
return 0;
}

BC32-输出学生信息

1
2
3
4
5
6
7
8
9
#include <stdio.h>

int main()
{
printf("Name Age Gender\n");
printf("---------------------\n");
printf("Jack 18 man\n");
return 0;
}

BC18-计算带余除法

1
2
3
4
5
6
7
8
#include <stdio.h>

int main() {
int a = 0, b = 0;
scanf("%d %d", &a, &b);
printf("%d %d\n", a / b, a % b);
return 0;
}

BC17-计算表达式的值

1
2
3
4
5
6
7
8
#include <stdio.h>

int main() {
int a = 0, b = 0;
scanf("%d %d", &a, &b);
printf("%d %d\n", a / b, a % b);
return 0;
}