最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

Java實現(xiàn) 輸入3個數(shù)a,b和c,輸出最大的數(shù)

2022-10-05 09:19 作者:酸奶公園  | 我要投稿

package ceshi;


import java.util.Scanner;


public class test10051 {


public static void main(String[] args) {

Scanner s = new Scanner(System.in);?

? ? ? ? System.out.print("分別輸入a,b,c的值:");?

? ? ? ? int a =s.nextInt();

? ? ? ? int b =s.nextInt();

? ? ? ? int c =s.nextInt();

? ? ? ? s.close();

System.out.println("a,b,c的值分別為:" + a + " "+ b + " "+ c);

int max = 0;

if(a < b) {

max = b;

}?

if(max < c) {

max = c;

}

System.out.println("三個數(shù)中的最大為" + max);

}

}


Java實現(xiàn) 輸入3個數(shù)a,b和c,輸出最大的數(shù)的評論 (共 條)

分享到微博請遵守國家法律
神农架林区| 白朗县| 临洮县| 云霄县| 郁南县| 杂多县| 嘉善县| 承德县| 溧水县| 康定县| 德化县| 铜鼓县| 垣曲县| 本溪市| 阿拉善盟| 瑞昌市| 屯门区| 临邑县| 枣阳市| 邹平县| 武功县| 隆昌县| 迁西县| 阆中市| 蒙山县| 渝北区| 宿州市| 舒城县| 水城县| 余干县| 新巴尔虎左旗| 出国| 岗巴县| 遂平县| 巴彦县| 保靖县| 瑞安市| 磐石市| 曲麻莱县| 建瓯市| 长汀县|