.求10 个整数中最大值

#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
int main() {
	int tep;
	int max;
	scanf("%d", &max);
	for (int i = 0;i < 10;i++) {
		scanf("%d", &tep);
		if (tep > max) {
			max = tep;
		}
	}
	printf("%d", max); 
	system("pause");
	return 0;
}

猜你喜欢

转载自blog.csdn.net/weixin_44374280/article/details/88970588