View difference between Paste ID: GdvYpYXb and eDTCNtsC
SHOW: | | - or go back to the newest paste.
1
import java.util.Scanner;
2
3
public class _3_21 {
4
	public static void main(String[] args){
5-
		int antal;
5+
6
		int tal;
7
	
8
		Scanner scan = new Scanner (System.in);
9
		System.out.println("Skriv in 5 heltal:");
10-
		System.out.print("Skriv in 5 heltal:");
10+
11-
		antal = scan.nextInt();
11+
12
			System.out.print("Skriv in heltal: ");
13-
		
13+
			tal = scan.nextInt();
14-
		if (antal > max){
14+
			if(tal > max){
15-
			max = antal;
15+
				max = tal;
16
			}
17
		}
18-
		
18+
19
		System.out.print("Det största talet är :" + max);
20
	}
21-
			antal = scan.nextInt();
21+