2021/11/27
#includemain() { int n; int max = 0, min = 0; printf("please input five numbers,system will return the maximum value and the minimum value among them:n"); for (int i = 0; i < 5; i++) { scanf_s("%d", &n); if (i == 0) { max = n; min = n; } if (n > max) max = n; if (n < min) min = n; } printf("the maximum is:%d,the minimum is:%dn", max, min); return 0; }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)