The problem comes in line 34: Cannot implicitly convert type 'double' to 'int'. An explicit conversion exists (are you missing a cast?)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string FirstName;
string LastName;
int Hours = 0;
int OvertimeHours = 0;
int HourlyPay;
int GrossPay;
//float AveragePay;
Console.WriteLine("Please enter your first name!");
FirstName = Console.ReadLine();
Console.WriteLine("Please enter your last name!");
LastName = Console.ReadLine();
Console.WriteLine("How many hours have you worked this week?");
Hours = Int32.Parse(Console.ReadLine());
Console.WriteLine("How many overtime hours did you work this week?");
OvertimeHours = Int32.Parse(Console.ReadLine());
Console.WriteLine("What is your hourly pay ?");
HourlyPay = Int32.Parse(Console.ReadLine());
if (Hours > 40)
GrossPay = (OvertimeHours * HourlyPay *1.5) + (Hours * HourlyPay);
else
GrossPay = (Hours * HourlyPay);
Console.ReadLine();
}
}
}
I have no idea what to do right now, and what a double is at all. I'm still a very new programmer with only like a few weeks experience and any and all help would be appreciated, thanks.