Advertisement
Weewee21

TheaterStudentsTicketPriceTotalSum

Sep 27th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp8
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("\n=====================");
  10.  
  11.             Console.WriteLine("\nWelcome to the Theater-Ticket Pricer 5000!");
  12.  
  13.             Console.WriteLine("\n=====================");
  14.  
  15.             double PriceOfTickets, NumberOfStudents, TotalEarnings;
  16.  
  17.             Console.Write("\nWhat's the Ticket Price per Student?: ");
  18.             PriceOfTickets = double.Parse(Console.ReadLine());
  19.  
  20.             Console.Write("\nWhat's the Number of Students that will be going to the Theater?: ");
  21.             NumberOfStudents = double.Parse(Console.ReadLine());
  22.  
  23.             Console.WriteLine("\n=====================");
  24.  
  25.             Console.WriteLine("\nCalculating...");
  26.  
  27.             TotalEarnings = (PriceOfTickets * NumberOfStudents);
  28.  
  29.             Console.WriteLine("\nThe Total Earnings for the Theater Show were: {0:F2} $", TotalEarnings);
  30.  
  31.             Console.WriteLine("\n=====================");
  32.         }
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement