This week, you need to write a program for Magic Blender company, which sells a
ID: 3647474 • Letter: T
Question
This week, you need to write a program for Magic Blender company, which sells a blender for $39.95.
The program should prompt the user for the following information:
Ensure that the program displays the following:
You may use the following format as reference to write the program.
Save the program as OrderReceipt.cs.
Embed the program in a Microsoft Word document with a description of your programming strategy.
Cite any sources in APA format on a separate page.
Name your document SU_ITS2105_W1_A4_LastName_FirstInitial.doc.
Explanation / Answer
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OrderRecipt { class Program { static void Main(string[] args) { Console.Write("Enter Your Name: "); string Name = Convert.ToString(Console.ReadLine()); Console.Write("Street Address: "); string S_Addr = Convert.ToString(Console.ReadLine()); Console.Write("City: "); string City = Convert.ToString(Console.ReadLine()); Console.Write("State: "); string State = Convert.ToString(Console.ReadLine()); Console.Write("Zip Code: "); string Zip = Convert.ToString(Console.ReadLine()); Console.Write("How many blenders you want to order? "); int Order = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Reciept for: "); Console.WriteLine(Name+" "+S_Addr+" "+City+", "+State+" "+Zip+" "); Console.WriteLine(Order.ToString() + " blenders were ordered @$39.95 each" + " "); double total = 39.95 * (float)Order; double tax = .07 * total; double net = total - tax; Console.WriteLine("Total: " + " " + "$" + total.ToString()); Console.WriteLine("Tax: " + " " + "$" + tax.ToString()); Console.WriteLine("----------------------------------------------"); Console.WriteLine("Due: " + " " + "$" + net.ToString()); } } }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.