package com.c2; import java.util.Random; import java.util.Scanner; //输入10个数,找出最大一个数,并打印出来。 public class IO { public static void main(String[] args) { Scanner c = new Scanner(System.in); System.out.println("请输入3个数------"); int b = c.nextInt(); int b1 = c.nextInt(); int b2 = c.nextInt(); int max = 0; for (int i = 0; i <= 10; i++) { if (b > b1 && b > b2) { max = b; } else if (b1 > b && b1 > b2) { max = b1; } else { max = b2; } } System.out.println("最大的数是" + max); } }