Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.57 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class Oppg3d {
  4.  
  5.      public static void main(String[] args) {
  6.  
  7.         Scanner console = new Scanner(System.in);
  8.  
  9.         int valg = 0;
  10.  
  11.  
  12.         while(valg!=4){
  13.             System.out.println("\n1 = Oppg_3a, 2 = Oppg_3b, 3 = Oppg_3c, 4 = avslutt: ");
  14.             valg = console.nextInt();
  15.             if(valg==1){
  16.             Oppg_3a.getSum(console);
  17.             }
  18.             else if(valg==2) {
  19.                 Oppg_3b.printNumbers(console);
  20.             }
  21.             else if(valg==3){
  22.                 Oppg_3c.printNumbersIncreasing(console);
  23.             }
  24.             else if(valg>4) {
  25.                 System.out.println("Ugyldig valg");
  26.             }
  27.         }
  28.  
  29.  
  30.      }
  31.  
  32.  
  33.  
  34. }
Add Comment
Please, Sign In to add comment