Answer to Question #17044 in C# for ahmed

Question #17044
Write a C# program that:
• Asks the user to enter the desired weekly pay rate.
• Reads the desired pay rate from the user.
• Checks the pay rate if it is more than or equals to 1000, prints the message "You
should work more than 35 hours.".
• Checks the pay rate if it is between 500 and 1000, prints the message "You should
work between 25 to 40 hours.".
• Otherwise, prints the message "Your weekly pay rate is not correct.".
1
Expert's answer
2012-10-30T12:10:38-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WeeklyRate
{
class Program
{
static void Main(string[] args)
{
int payRate;
Console.WriteLine("Enter the desired weekly pay rate");
String temp =Console.ReadLine();
payRate =Convert.ToInt32(temp);

if (payRate >=1000)
{
Console.WriteLine("You should work more than 35 hours.");
}
else if (payRate>= 500 && payRate < 1000)
{
Console.WriteLine("You should work between 25 to 40 hours.");
}
else
Console.WriteLine("Your weekly pay rate is not correct.");
Console.ReadKey();
}
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS