Advertisement
Weewee21

VATNoVATProductListPriceCalculatorListing

Sep 23rd, 2020 (edited)
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.46 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp6
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("\nWelcome to the Value-added Tax & Without Calculator 5000!");
  10.  
  11.             Console.WriteLine("\n========================");
  12.  
  13.             double P1, P2, P3, P1NoVAT, P2NoVAT, P3NoVAT, P1VAT, P2VAT, P3VAT, VAT, TotalNoVAT, TotalVAT;
  14.  
  15.             VAT = (1.17); // Known Fee Price Values
  16.  
  17.             Console.Write("\nPlease Enter the Price of Product 1: "); // Inputs for evaluating the Product Prices
  18.             P1 = double.Parse(Console.ReadLine());
  19.  
  20.             Console.Write("\nPlease Enter the Price of Product 2: ");
  21.             P2 = double.Parse(Console.ReadLine());
  22.  
  23.             Console.Write("\nPlease Enter the Price of Product 3: ");
  24.             P3 = double.Parse(Console.ReadLine());
  25.  
  26.             Console.WriteLine("\n========================");
  27.  
  28.             Console.WriteLine("\nCalculating...");
  29.  
  30.             P1NoVAT = P1; // Non-VAT & VAT Calculations of Products
  31.  
  32.             P2NoVAT = P2;
  33.  
  34.             P3NoVAT = P3;
  35.  
  36.             P1VAT = (P1 * VAT);
  37.  
  38.             P2VAT = (P2 * VAT);
  39.  
  40.             P3VAT = (P3 * VAT);
  41.  
  42.             TotalNoVAT = (P1NoVAT + P2NoVAT + P3NoVAT);
  43.  
  44.             TotalVAT = (P1VAT + P2VAT + P3VAT);
  45.  
  46.             Console.WriteLine("\nIt is known that the VAT Percentage for a Product is 17%.");
  47.  
  48.             Console.WriteLine("\n========================");
  49.  
  50.             Console.WriteLine("\nListing Product Price without VAT...");
  51.  
  52.             Console.WriteLine("\nProduct 1(NO VAT): {0} NIS", P1NoVAT); // Printing the Non-VAT Price Values for the Products
  53.  
  54.             Console.WriteLine("\nProduct 2(NO VAT): {0} NIS", P2NoVAT);
  55.  
  56.             Console.WriteLine("\nProduct 3(NO VAT): {0} NIS", P3NoVAT);
  57.  
  58.             Console.WriteLine("\nTotal Product Price List(NO VAT): {0} NIS", TotalNoVAT);
  59.  
  60.             Console.WriteLine("\n========================");
  61.  
  62.             Console.WriteLine("\nListing Product Price with VAT...");
  63.  
  64.             Console.WriteLine("\nProduct 1(VAT): {0:F5} NIS", P1VAT); // Printing the VAT Price Values for the Products
  65.  
  66.             Console.WriteLine("\nProduct 2(VAT): {0:F5} NIS", P2VAT);
  67.  
  68.             Console.WriteLine("\nProduct 3(VAT): {0:F5} NIS", P3VAT);
  69.  
  70.             Console.WriteLine("\nTotal Product Price List(VAT): {0:F5} NIS", TotalVAT);
  71.  
  72.             Console.WriteLine("\n========================");
  73.         }
  74.     }
  75. }
  76.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement