Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace übung2
  7. {
  8.     class Program
  9.     {
  10.         static decimal Bruto;
  11.         static decimal Netto;
  12.        
  13.        
  14.         static string Eingabe;
  15.         static void Main(string[] args)
  16.         {
  17.             decimal mw = 19;
  18.             while (true)
  19.             {
  20.                 Console.Write("Nettobetrg?:");
  21.                 Eingabe = Console.ReadLine();
  22.                 if (Eingabe == String.Empty)
  23.                 {
  24.                     Console.Write("Bitte nur Zehalen Eingaben\nPrgramm wird beendet.\n");
  25.                     return;
  26.                 }
  27.                 else
  28.                 {
  29.                     Netto = Convert.ToDecimal(Eingabe); // Eingabe des Nettobetrags
  30.  
  31.  
  32.                     mw = (Netto * 19) / 100;
  33.                     Bruto = Netto * (1 + (mw / 100));
  34.                     Console.WriteLine("Mehrwertasteuer:\t{0}\nBruto:\t\t\t{1}\n", mw.ToString("F2"), Bruto.ToString("F2"));
  35.                     break;
  36.                 }
  37.             }
  38.             Console.ReadLine();
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement