Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 KB | None | 0 0
  1.  
  2. //Compute the discounted price.
  3.  
  4. using System;
  5.  
  6. namespace prac_2
  7. {
  8.     class discount
  9.     {
  10.         static void Main()
  11.         {
  12.             double emailusage;
  13.  
  14.             const double emaildata = 0.02731;
  15.  
  16.             int month = 30;
  17.  
  18.             int gig = 1024;
  19.  
  20.             Console.WriteLine("In a typical day, how often do you do these activities while");
  21.             Console.WriteLine("you're not connected to any wifi?");
  22.             Console.WriteLine();
  23.             Console.WriteLine("Emails:");
  24.             Console.WriteLine("0      5      25      50      100      250+");
  25.             Console.WriteLine("How many emails [without attachments] do you send/receive? ");
  26.  
  27.             emailusage = double.Parse(Console.ReadLine());
  28.  
  29.             emailusage = (emailusage * emaildata * month / gig);
  30.  
  31.             Console.WriteLine(emailusage);
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement