ZKX's LAB

从键盘输入3个数 将其中的最大值输出 输入3个数并输出其中的最大值

2021-04-09知识6

C语言编程:由键盘输入任意三个数,编程实现输出其中的最大数 include<;stdio.h>;void main(){ int a,b,c,max;printf(\"please input 3 numbers for testing\\n\");scanf(\"%d%d%d\",&a,&b,&c);max=a;if(max<;=b)max=b;if(max)max=c;printf(\"%d。

有三个整数a、b、c,由键盘输入,输出其中最大值 try { BufferedReader br=new BufferedReader(new InputStreamReader(System.in));int[]a=new int[3];接受三个整数放在数组中for(int i=0;i;i+){a[i]=Integer.parseInt(br。.

从键盘输入三个数,输出其中最大数,该怎样编?谢谢 三个数a,b,c,设最大数是maxmax=a>;b?a:b;if(c>;max)max=c;

#从键盘输入3个数 将其中的最大值输出

随机阅读

qrcode
访问手机版