Question: UPDATE ERRORS using System; using static System.Console; namespace Exercise1_Console { class Program { // variable declaration static int floorLength, floorWidth; static double costPerSqFt, totalMaterial, totalLabor,

UPDATE ERRORS

UPDATE ERRORS using System; using static System.Console; namespace Exercise1_Console { class Program

using System;

using static System.Console;

namespace Exercise1_Console { class Program

{ // variable declaration static int floorLength, floorWidth; static double costPerSqFt, totalMaterial, totalLabor, installTime, total; static string floorLengthString, floorWidthString, costSqFtString;

// initialize constants const double COST_PER_HOUR = 35.75; const double SQ_FT_PER_HOUR = 40.00;

static void Main(string[] args) { Console.WriteLine("Jo's Flooring Cost Estimator");

// get user input Console.Write(" Please enter the floor length: "); floorLengthString = ReadLine(); floorLength = Convert.ToInt32(floorLengthString);

Console.Write("Please enter the floor width: "); floorWidthString = ReadLine(); floorWidth = Convert.ToInt32(floorWidthString);

Console.Write("Please enter the cost per square foot for the chosen flooring: "); costSqFtString = ReadLine(); costPerSqFt = Convert.ToDouble(costSqFtString);

Console.WriteLine("--------------------");

// calculate total cost totalMaterial = floorLength * floorWidth * costPerSqFt; installTime = (floorLength * floorWidth) / SQ_FT_PER_HOUR; totalLabor = installTime * COST_PER_HOUR; total = totalLabor + totalMaterial;

// display results Console.WriteLine("For a total floor size of {0} the flooring cost is {1}", (floorLength * floorWidth), totalMaterial.ToString("C")); Console.WriteLine("It will take {0} hours to install the floor at a cost of {1}", installTime.ToString("F"), totalLabor.ToString("C")); Console.WriteLine("The total installation cost for the new floor is: {0}", total.ToString("C")); } }

// end of program

OUTPUT EA Microsoft Visual Studio Debug Console Chris Flooring Cost Estimator Please enter length of floor: 75 please enter width of floor: 15 please enter the cost per square foot for the flooring selected: 5.25 For a total floor size of 1125 the flooring cost is $5,906.25 It will take 28.13 hours to install the floor at a cost of $1,605.47 The total finished cost for the new floor is: $6,911.72

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!