第33课第四题

来源:互联网 发布:北京炫彩网络印刷 编辑:程序博客网 时间:2024/05/17 03:25
#include <stdio.h>#include <stdlib.h>//第四题,多个数取最大int main( ){    int  k,x,max;    printf("请输入10个整数:");    scanf("%d", &x);    max=x;    for(k=2;k<=10; k++)    {        scanf("%d", &x);        if (x>=max)            max=x;    }    printf("Max=%d\n", max);    return 0;}

0 0
原创粉丝点击