Advertisement
Hazem3529

Untitled

May 22nd, 2015
525
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.59 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication2
  8. {
  9.     class Program
  10.     {
  11.  
  12.  
  13.         static void Main(string[] args)
  14.         {
  15.  
  16.             Console.WriteLine("enter sales per month");
  17.             double sales = double.Parse(Console.ReadLine());
  18.             double money = 0.0;
  19.             if (sales < 20000)
  20.             {
  21.                 for (int i = 1; i <= 12; i++)
  22.                 {
  23.                     money = money + (sales * 0.05);
  24.  
  25.                     Console.WriteLine("sales for month {0} is {1} $", i, (money + sales));
  26.  
  27.                 }
  28.                 Console.WriteLine("and the total money after a year is : " + (sales + money));
  29.  
  30.             }
  31.             else if (sales >= 20000 && sales <= 40000)
  32.             {
  33.                 for (int i = 1; i <= 12; i++)
  34.                 {
  35.                     money = money + (sales * 0.75);
  36.  
  37.                     Console.WriteLine("sales for month {0} is {1} $", i, (money + sales));
  38.  
  39.                 }
  40.                 Console.WriteLine("and the total money after a year is : " + (sales + money));
  41.             }
  42.             else if (sales > 40000)
  43.             {
  44.                 for (int i = 1; i <= 12; i++)
  45.                 {
  46.                     money = money + (sales * 1.2);
  47.  
  48.                     Console.WriteLine("sales for month {0} is {1} $", i, (money + sales));
  49.  
  50.                 }
  51.                 Console.WriteLine("and the total money after a year is : " + (sales + money));
  52.  
  53.  
  54.             }
  55.  
  56.         }
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement