คำอธิบายโปรแกรมโบนัส

1,329
-1

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,329
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

คำอธิบายโปรแกรมโบนัส

  1. 1. using System; //class Bonus // Bonus{static void Main() { // Console.WriteLine(); // 1 Console.Write(" <<<<= ========= Program Bonus ============ >>>>> "); // <<<<= ========= Program Bonus =========== =>>>>>Console.WriteLine(); // 1Console.WriteLine(); // 1Console.Write("Input In sales in Month of 1 = = >> "); // Input In sales in Month of 1 = = >>double price1 = double.Parse(Console.ReadLine()); // Keybord Price1Console.WriteLine();
  2. 2. // 1Console.Write("Input In sales in Month of 2 = = >> "); // Input In sales in Month of 1 = = >>double price2 = double.Parse(Console.ReadLine()); // Keybord Price2Console.WriteLine(); // 1Console.Write("Input In sales in Mount of 3 = = >> "); // Input In sales in Month of 3 = = >>double price3 = double.Parse(Console.ReadLine()); // Keybord Price3Console.WriteLine(); // 1Console.Write("Input In sales in Mount of 4 = = >> "); // Input In sales in Month of 4 = = >>double price4 = double.Parse(Console.ReadLine()); // Keybord Price4Console.WriteLine(); // 1Console.Write("Input In sales in Mount of 5 = = >> ");
  3. 3. // Input In sales in Month of 5 = = >>double price5 = double.Parse(Console.ReadLine()); // Keybord Price5Console.WriteLine(); // 1Console.Write("Input In sales in Mount of 6 = = >> "); // Input In sales in Month of 6 = = >>double price6 = double.Parse(Console.ReadLine()); // Keybord Price6Console.WriteLine(); // 1double total = price1+ price2+ price3+ price4+ price5+ price6; // 6 Total ToalConsole.WriteLine(" << ==In sales of Very Mount == >> {0:f2} ", total); // << ==In sales of Very Mount == >> totalConsole.WriteLine(); // 1
  4. 4. if (total<=20000)// total<=20000Console.WriteLine("<<< ======== Bonus is {0:f2}=========>>>",total*10/100); // total*10/100else if (total<=35000) // total<=35000Console.WriteLine("<< ========Bonus is {0:f2} =========>>>", total* 15 / 100); // total*15/100else if (total<=70000) // total<=70000Console.WriteLine("<< ========Bonus is {0:f2} =========>>>", total* 20 / 100); // total*20/100else //
  5. 5. Console.WriteLine("<< ========Bonus is {0:f2} =========>>>", total* 40 / 100); // total*40/100System. Console.ReadLine();// Keybord 1}}

×