คำอธิบายโปรแกรมโบนัส
Upcoming SlideShare
Loading in...5
×
 

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

on

  • 779 views

 

Statistics

Views

Total Views
779
Views on SlideShare
779
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

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

  • 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();
  • // 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 = = >> ");
  • // 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
  • 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 //
  • Console.WriteLine("<< ========Bonus is {0:f2} =========>>>", total* 40 / 100); // total*40/100System. Console.ReadLine();// Keybord 1}}