I am a travel agent, I book in-city ride tickets and also ship your luggage to the next
destination.
1-NYC All Around Town it is $29.00
2-Big Bus NYC Tour it is $49.00
3-NYC one day guided Sightseeing Tour it is $89.00
4-Circle Line Complete Manhattan Island Cruise is $44.00
5-Viator VIP: Empire State Building, Statue of Liberty and 9/11 Memorial is $129.00
I also provide a quote for your shipment to be mailed to your next destination.
In order to calculate our quote, we need to know the
total weight of the shipment in pounds, the distance in miles and whether or
not there are hazardous materials in the shipment (e.g. batteries).
The calculation for the quote is as follows:
Quote = .65 * # of miles + .83 * # of pounds
If there is hazardous materials in the shipment, there is an extra cost of .20 * # of pounds
If the distance for the delivery is less than 150 miles and the total weight for
the shipment is greater than 500 pounds, then there should be a 10% discount off of the
total quote.
Create a c# console app using conditional statement.
Create a c# console app using conditional statement.
============================================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
double miles, pounds;
String hazardmaterial;
double quote;
Console.Write("Enter weight in pounds: ");
pounds = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter distance in miles: ");
miles = Convert.ToDouble(Console.ReadLine());
Console.Write("Whether or not there are hazardous materials in
the shipment(e.g.batteries)\nwrite yes or no: ");
hazardmaterial = Console.ReadLine();
if(hazardmaterial=="yes")
{
quote = 0.65 * miles + (0.83 + 0.20) * miles;
}
else
{
quote = 0.65 * miles + 0.83 * miles;
}
if(miles<150 && pounds>500)
{
quote = quote * 90 / 100;
}
Console.WriteLine("qute is {0}",quote);
Console.WriteLine("Press Enter to continue ");
Console.ReadLine();
}
}
}
============================================================================================
Output
Get Answers For Free
Most questions answered within 1 hours.