63 033
Assignments Done
99,1%
Successfully Done
In July 2018

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.".
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions