Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.31 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package aktivitet1;
  7.  
  8. /**
  9.  *
  10.  * @author jelfv
  11.  */
  12. import java.util.Scanner;
  13. public class Aktivitet1 {
  14.    
  15.     Scanner input = new Scanner(System.in);
  16.    
  17.     public static void main(String[] args) {
  18.        
  19.         Scanner input = new Scanner(System.in);
  20.  
  21.          System.out.println("Tryck 1 för att boka aktivitet: ");
  22.  
  23.                  
  24.          int act = input.nextInt();
  25.          
  26.          if (act == 1) {
  27.              
  28.              System.out.println("Tryck 1 för att boka Spinning: ");      
  29.              System.out.println("Tryck 2 för att boka Aerobics: ");
  30.              System.out.println("Tryck 3 för att boka Yoga: ");
  31.            
  32.          }
  33.          
  34.          int act2 = input.nextInt();
  35.          
  36.          if (act2 == 1) {
  37.          
  38.              System.out.println("Du har valt Spinning, välj rad mellan 1-3: ");
  39.          }
  40.          
  41.          int rad = input.nextInt();
  42.          
  43.          if (rad >= 1 && rad <= 3);
  44.          
  45.          System.out.println("Du har valt spinning och bokat rad " + rad + ".");
  46.        
  47.          }
  48.  
  49.          
  50.          
  51.          
  52.          
  53.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement