Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace übung2
- {
- class Program
- {
- static decimal Bruto;
- static decimal Netto;
- static string Eingabe;
- static void Main(string[] args)
- {
- decimal mw = 19;
- while (true)
- {
- Console.Write("Nettobetrg?:");
- Eingabe = Console.ReadLine();
- if (Eingabe == String.Empty)
- {
- Console.Write("Bitte nur Zehalen Eingaben\nPrgramm wird beendet.\n");
- return;
- }
- else
- {
- Netto = Convert.ToDecimal(Eingabe); // Eingabe des Nettobetrags
- mw = (Netto * 19) / 100;
- Bruto = Netto * (1 + (mw / 100));
- Console.WriteLine("Mehrwertasteuer:\t{0}\nBruto:\t\t\t{1}\n", mw.ToString("F2"), Bruto.ToString("F2"));
- break;
- }
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement