In: Computer Science
Thanks for the question. Below is the code you will be needing. Let me know if you have any doubts or if you need anything to change.
Let me know for any help with any other questions.
Thank You!
===========================================================================
using System;
class MainClass {
public static void Main (string[] args) {
const double RATE = 80.0;
double hoursWorked;
double totalHours = 0;
double payment = 0;
Console.Write("Enter hours worked on Monday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Tuesday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Wednesday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Thursday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Friday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Saturday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
Console.Write("Enter hours worked on Sunday: ");
hoursWorked = Convert.ToDouble(Console.ReadLine());
totalHours += hoursWorked;
payment = totalHours*RATE;
Console.WriteLine("Total hours worked in week: "+totalHours.ToString("0.##"));
Console.WriteLine("Payment: $"+payment.ToString("0.00"));
}
}
======================================================================