Question: using System; / / Program Lab 1 C . cs public class Lab 1 C { / / Calculates fuel efficiency based on values entered
using System;
Program LabCcs
public class LabC
Calculates fuel efficiency based on values entered by the user.
public static void Main String args
int miles;
double gallons, mpg;
Console.Write Enter the number of miles: ;
miles Convert.ToIntConsoleReadLine;
Console.Write Enter the gallons of fuel used: ;
gallons Convert.ToIntConsoleReadLine;
mpg miles gallons;
Console.WriteLine Miles Per Gallon: mpg;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
