/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package briefporto;

import java.util.Scanner;

/**
 *
 * @author Kleeblattsammler
 */
public class Briefporto {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        Scanner eingabe = new Scanner (System.in);
        
        int masse;
        double porto;
        int antwort;
        int antwort2;
        
        System.out.println("Welche Briefart wurde versendet: 1=Postkarte; 2=Brief; 3 = Paket");
        
        antwort = eingabe.nextInt();
        
        if (antwort == 1) {
            
            porto = 0.60;
            
        } else if (antwort == 2) {
            
            System.out.println("Gib die Masse des Briefs in Gramm an.");
            
            antwort2 = eingabe.nextInt();
            
            if (antwort2 < 20) {
                
                porto = 0.80;
                
            } else if (antwort2 < 50) {
                
                porto = 0.95;
                
            } else if (antwort2 < 500) {
                
                porto = 1.55;
                
            } else {
                
                porto = 2.70;  
            } 
        } else {
            
            porto = 4.50;
        }
        
        System.out.println("Das Briefporto beträgt" + porto + " Euro");
    }
    
}
