Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Project Debug Team Tools Test Analyze Window Help Attach New Project p Recent ^

ID: 3746844 • Letter: P

Question

Project Debug Team Tools Test Analyze Window Help Attach New Project p Recent ^ Installed ort ay Default Start Console App (NET Core) Type: Visual C# project for creating a c application that can,un Visual C# Visual C# Visual C# Visual C# Visual C# Visual C# Get Started Windows Desktop Class Library CNET Core Windows, Linux and Ma first app in 5 minu our productivityNET Core tage of the newes p Web NET Standard Cloud Test MSTest Test Project (,NET Core) xUnit Test Project (NET Core) ASP.NET Core Web Application liable websites odern, fully-nativs Visual Basic D Visual C++ Visual F# SQL Server Other Project Types p Online t(Miller).sln sersDonavonlso Not finding what you are looking for? Open Visual Studio Installer Name soleApp2.sin Solution name sersDonavonlso L/ create directory for sol Add to Source Control oK soleApp1.sin

Explanation / Answer

using System;

namespace Sample

{

class Gallonsestimator

{

public static void Main(string[] args)

{

double length,width,height,doorCount,Area,doorAllowance,windowCount,windowAllowance,totalAllowance,gallons,paintPrice,cost;

Console.Write("Enter length: ");

length=console.read();

Console.Write("Enter width: ");

width=console.read();

Console.Write("Enter height: ");

height=console.read();

Area=length*width;

Console.Write("Enter the number of doors: ");

doorCount=console.read();

doorAllowance=doorCount*14

Console.Write("Enter the number of windows: ");

windowCount=console.read();

windowAllowance=windowCount*8.5;

totalAllowance=Area-windowCount-windowAllowance;

gallons=totalAllowance/350;

paintPrice=console.read();

cost=gallons*paintPrice;

Console.WriteLine("gallons = {0}",gallons);

Console.WriteLine("Price = {0}",cost);

}

}

}