Project Debug Team Tools Test Analyze Window Help Attach New Project p Recent ^
ID: 3746948 • 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.sinExplanation / Answer
using System; namespace MobileAppCharges { class Program { static void Main(string[] args) { Console.Write("Enter total number of messages sent: "); int n = Convert.ToInt32(Console.ReadLine()); double charge = 5; if(n > 200) { charge += (100 * 0.05) + ((n - 200) * 0.1); } else if(n > 100) { charge += ((n - 100) * 0.05); } double tax = charge * 0.12; Console.WriteLine("Charge: ${0:F2}", charge); Console.WriteLine("Tax : ${0:F2}", tax); Console.WriteLine("Final bill amount : ${0:F2}", tax+charge); } } }
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.