Joke Collection Website - Bulletin headlines - Write a program in C#
Write a program in C#
Use the system. Assemble. Generics;
Use the system. Linq
Use the system. Text;
Use the system. Threads. Task;
Namespace Console Application 4
{
Class plan
{
Static int Normal = 20
static int Unnormal = 20 * 3;
Static double tax = 0.08;
Static void calculates salary (string hours, int price)
{
Double salary =0, tax = 0;
Tax = conversion. ToInt32 (hours) * price * tax;
Salary = conversion. ToInt32 (hour) * price *( 1- tax);
Console. WriteLine ("salary: {0}, tax: {1}", salary, tax);
}
Static void Main(string[] args)
{
Int current price;
While (true)
{
Console. Write ("Enter week:");
String week = console. ReadLine();
Console. Write ("Enter working hours:");
String Time = Console. ReadLine();
If (week =="6" || week =="7 ") Current price = abnormal;
Else current price = normal;
Switch (week)
{
Case "1": Calculate salary (time, current price);
Break;
Case "2": Calculate salary (time, current price);
Break;
Case "3": Calculate salary (time, current price);
Break;
Case "4": Calculate salary (time, current price);
Break;
Case "5": Calculate salary (time, current price);
Break;
Case "6": Calculate salary (time, current price);
Break;
Case "7": Calculate salary (time, current price);
Break;
Default: Console. WriteLine(" ERROR ");
Break;
}
}
}
}
}
- Previous article:Kindergarten cute trash can slogan creativity
- Next article:Environmental protection handwritten newspaper pictures
- Related articles
- Let’s talk about the relationship between the work of the Young Pioneers and moral education work
- Studying accounting in Australia, what classes will you take in the first semester?
- Shopping malls are forbidden to skip slogans.
- Slogans to prevent disease
- Japanese Common Sentences in Animation
- How to write a slogan to welcome company leaders to visit?
- Safe production management policy slogans
- Give me more jokes.
- What do the 56 characters in WeChat mean?
- Can I still drink after desalination?