there are (7) days of the week, that is Sunday through Saturday. in a company, i
ID: 671868 • Letter: T
Question
there are (7) days of the week, that is Sunday through Saturday. in a company, if a person works on Monday to Friday he receives regular wages. if he works on Saturday , he is entitled to an extra duty allowance. a worker who reports to work in Sunday is not entitled to any allowance since the office is closed on that day. write a C# program that accept an input the day a person works and determine whether he is entitled to allowances or not. a worker who reports on Sunday must be penalized. there are (7) days of the week, that is Sunday through Saturday. in a company, if a person works on Monday to Friday he receives regular wages. if he works on Saturday , he is entitled to an extra duty allowance. a worker who reports to work in Sunday is not entitled to any allowance since the office is closed on that day. write a C# program that accept an input the day a person works and determine whether he is entitled to allowances or not. a worker who reports on Sunday must be penalized. there are (7) days of the week, that is Sunday through Saturday. in a company, if a person works on Monday to Friday he receives regular wages. if he works on Saturday , he is entitled to an extra duty allowance. a worker who reports to work in Sunday is not entitled to any allowance since the office is closed on that day. write a C# program that accept an input the day a person works and determine whether he is entitled to allowances or not. a worker who reports on Sunday must be penalized.Explanation / Answer
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Worker
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter the working day (Sunday to Saturday)");
String day = Console.ReadLine();
if (day.ToLower().Equals("saturday"))
{
Console.WriteLine("Entitled to an extra duty allowance");
} else if(day.ToLower().Equals("sunday") ){
Console.WriteLine("Sunday is holiday. Worker to be punished");
} else {
Console.WriteLine("No allowance");
}
Console.ReadKey();
}
}
}
/////////////////////////sample output////////////////////////////////////
Enter the working day (Sunday to Saturday)
Saturday
Entitled to an extra duty allowance
Enter the working day (Sunday to Saturday)
Sunday
Sunday is holiday. Worker to be punished
Enter the working day (Sunday to Saturday)
Monday
No allowance
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.