Question: C# Correct my code please,if you find another errors will be also great! Questuons: 1.1&1.2 If customer won the game(line155),it should be text congrats message




WriteLine("*************** ACME Anvils Corporation 21 Page 1 WriteLine(" Supporting the animation industry for 7 years and counting!"); Write(" Countdown to Order:"); Countdown to get new order(waiting 3 seconds) for (int i = 3; 10: 1-- { Systen.Threading.Thread.Sleep (1808). Write(" {e}", 0); } Write(" *** NEW ORDER * 70 WriteLine("ASCRIPT: Hi, I'* Nick. How many anvits would you like to order today?") // Validating number of atvits, it should be whale and positive number! Write("Number of ants: "); tot nuantity = int.Parsellainen while quantity >= ) 4 Write("Nanber of anvils must be a positive, whole number!"): WriteLine("TRY AGAIN:"); Writers Number of anvils: "); quantity = Convert.ToInt32(ReadLine)); } 73 74 35 76 77 78 29 38 01 82 23 94 ES 36 37 WriteLine("SCRIPT: I can certainly help you with that could you please give me your name and address: //Validting customer mane, 25 should be not entry! Writets"First and last name It") string nane ReadLine(): while (nane.Length) WriteLine("ERROR: Customer name is required."): WriteLine("TRY AGAIN:"); Write("First and last rate: \t"); name = ReadLine(): 29 98 91 92 93 94 95 96 97 Write("Street address: \t"): string street - ReadLine(); Write("City: \t\t\t"); string city ReadLine(); 99 100 191 122 103 184 1e5 106 107 108 189 //validating state, it should be states only on the list otherwise ERROR MESSAGE Write("State (2-letters) \t"); string state - ReadLine(); while (state. Toupper() != "A2" state. Toupper() != "A2" state. Tolspert) != "CA" state. Toupper() = WriteLine("\ nERROR.We do not ship to (03", state): WriteLine("\t\tValid state codes are: AK, AZ, CA, CO, NM DA UT. *"): Write(" Please try again\t"); state = ReadLine(): 111 112 113 114 115 126 117 116 119 120 121 122 W Validating zip code, it must be 5 characters long, otherwise ERROR MESSAGE Write("Zip code: \t\t"); string zip = ReadLine(): while (zip.Length = 5) WeiteLine("ERROR. Zip code must be 5 characters long"): Write("Please try again:\t"); write("zip code: 11 zip ReadLine(); 12 Page 2 13 112 33 133 11 114 27 112 Writet SCRIPTAre you a nenber of our futitty frequent shopper program, (y if year) futility eber = Readine 18 (utilityMember Topper{ } */ ENOT Writel"SCRIPT: what's wrong with you? That just cost you a 15% discount and an opportunity to win a gallon af invisible paint. Sad."): ) else i (futittyenber. Touspere fres 140 Writet" ASCRIPT: Excellent you'll receive an AMAZONE 150 discount on today's purchase what's more values were of our loyalty program, you'll be randorumber = RandonClass.extin. Max + 1); QUESS = R.Parse(ReadLine() I guess 5/der the between 1 and weite SCRIPT That's not number between 1 and S. what a naroon sul ve velve your loyalty."). else if (guess is randonlumber} // If at the correct number Write WOIPT: Aw, too bad. You guessed out the secret mer was () He paint. What a loser. Very and", quess, randon unber) else if (es randonnber the correct Write OKIPT: No hoo! You gumised the secret under(). Agallan af ACHEILU Paint headed your way! randomberi LSO 156 / store weitelinePress any hey 10 display nice...) Resey WriteLine" WriteLine) WriteLine ACHE AWAS Corporation Mas infantil Pring in the cele WriteLine("VACOSTORU INVOICE) WriteLIWA TO:) WriteLine, WIELO, streets WriteLinetyl WELLINO, writeLine". 110 143 1/Shows dat ons and cost per al WriteLine("(.-2011, 12)", "antityitquantity) IF (quantity as 1 quantity cost. costiscount WriteLine(0-20)4,11). "Cost per savali", cost.ToString(23) 112 133 10 else if (quantity 10 4 quantity 101 Cost castiscount: WriteLine1,-20X1,319", "cost per atti", cost.ToString(2 else if (quantity 20) 1 200 201 202 Page 3 205 206 207 200 209 eise 11 (Quantity 20) cost = costDiscount); WriteLinet".-2021,111". "Cost per ahvile, cost.ToString(2) else () /Cost depends on cuantity of avtu. Prices are in constant variables if (quantity 16 quantity 211 2 215 216 else if (quantity 20) 20 219 220 221 222 223 224 subtotal = costDiscount) quantity WriteLine(0.-2015, 11", "Subtoteli", subtotal.ToString("c2" else Ir customer na Menterstie will have prethe discount decoltilityClubDiscount = 0; IF (futility ember - Il futilityfferbery 14 futilityClubDiscount = decimal. Round isubtotal discount, 2); /USING DECAL ROUND WriteLine(0.-20%(1,0))", "Less 156 Futility Clubs". FutilityClubbiscount) taxable nount = subtotal-futilityClutoiscount: WriteLine.-2019,111". "Table unti, taxabletount.ToString2) 220 227 225 220 238 221 222 233 234 235 236 23 235 230 240 241 202 24 244 245 240 247 248 248 250 251 252 253 254 255 256 257 I Countingtak for enters If futilitytenter. Toupper() - *** tax = (taxableAmount taxrate) / 100 > else (tax = (subtotal. takratel / 100> WriteLine("{0.-2012,11)", "Sales Taxi", tax.ToString("c2")); //CHANCED shipping cost = shippingPrice + quantity: Writeline("0.-20X5,11)". "Shipping, shippingcost.ToString("") weiteLine("title EF (futility ember. Toupper() == "") 250 200 261 263 264 total = taxable nount + taxe shopingCost WriteLine!" (0.-2012, 111", "TOTALI", total.ToString("c2")); } else 266 267 total = subtotal + tax+ shippingcesti WriteLine(0.-2015, 111". "TOTALE", total.ToString("02"); 269 270 242 2013 244 Page4 tax = (taxable nount. taxrate) / 180: > else 200 242 245 {tax = subtotal = taxatel / 108;> WriteLine(-20H1,111, Sales Tax?", tax. Testring(2) 250 251 302 253 254 355 256 257 358 //DWNGED shippingCast shipping Price quantity: WriteLine(.-20X1, 11. Shipping: thipping cost.ToString"c2"); WriteLine("\t\tyt if (futility Henber. Toupper() ="V 23 total = taxablett + tax shipping costs 263 264 WriteLine(0.-2031,311". "TOTALI", total.ToString "0")) ) else 206 267 266 total = subtotal + tax + shippingCost; WriteLine(0.-2015.11", "TOTALI", total.ToString(2) 270 221 22 1.2 Writer'SCRIPT:And congratulations on winning FREE Invisible Paint): NEED TO FINISH lyst Customer wins, thou this secage 275 216 277 2018 201 22 200 204 203 23 283 WriteLine" "); WriteSCRIPT: Your total today is .*, total.ToString""); WriteLine! Thanks for shopping with Acne!") WriteLine("VASCRIPT: 't forget Act wvils fly father, drop faste, and land harder than any other is in the market!"); wille to asked the customer to order again or not 22 WriteLinelineady to take another arder order Again = ReadLine(): If forderAgkin.Tolipper() != " u arder again. Totieper() =) { 209 290 291 292 29 204 299 290 247 WriteLinel "Please enter " or ".) 3 299 300 361 while (orderAgain. Toupper() ! **" order Again.Toupper) ! "); Wie (ardengkin. Toppert) = ""> 13 304 } while fututymerber. Toupper() = * Il futilityHerber.Toppert) = ""); white order again. Topper) : 37 ReadKey(); 310 Countdown to Order: Nick ****** NEW ORDER --****** SCRIPT: H1, I'm Nick. How many anvits would you like to order today? Number of anvils: 3 SCRIPT: I can certainly help you with that. Could you please give me your nane and address? First and last name: Street address: Broadway City: New Jercey State (2-letters): CA Zip code: 11111 SCRIPT: Are you a member of our futility frequent shopper program, (Y if yes) y SCRIPT: Excellent! You'll receive an AMAZING alued member of our loyalty program, you'll have a chance to win a bonus gift in our exciting Members-only gallon of invisible paint contest! Pick SCRIPT: Aww, too bad. You guessed but the secret number was 2 No paint. What a loser. Very sad. Press any key to display invoice... av ACHE Anvils Corporation CUSTOMER INVOICE SHIP TO: NICK Broadway New Jercey CA 11111 Quantity: Cost per anvil: $80.00 Subtotal: $240.00 Less 154 Futility Club:( 36.00) Taxable amounti $204.00 Sales Taxi $20.30 Shipping: $297.00 TOTAL: $521.30 SCRIPT: And congratulations on winning FREE Invisible Paint!!!**** SCRIPT: Your total today is $521.38. Thanks for shopping with Acme! SCRIPT: don't forget: Acne anvils fly father, drop faste, and land harder than any other anvils in the market! Ready to take another order? WriteLine("*************** ACME Anvils Corporation 21 Page 1 WriteLine(" Supporting the animation industry for 7 years and counting!"); Write(" Countdown to Order:"); Countdown to get new order(waiting 3 seconds) for (int i = 3; 10: 1-- { Systen.Threading.Thread.Sleep (1808). Write(" {e}", 0); } Write(" *** NEW ORDER * 70 WriteLine("ASCRIPT: Hi, I'* Nick. How many anvits would you like to order today?") // Validating number of atvits, it should be whale and positive number! Write("Number of ants: "); tot nuantity = int.Parsellainen while quantity >= ) 4 Write("Nanber of anvils must be a positive, whole number!"): WriteLine("TRY AGAIN:"); Writers Number of anvils: "); quantity = Convert.ToInt32(ReadLine)); } 73 74 35 76 77 78 29 38 01 82 23 94 ES 36 37 WriteLine("SCRIPT: I can certainly help you with that could you please give me your name and address: //Validting customer mane, 25 should be not entry! Writets"First and last name It") string nane ReadLine(): while (nane.Length) WriteLine("ERROR: Customer name is required."): WriteLine("TRY AGAIN:"); Write("First and last rate: \t"); name = ReadLine(): 29 98 91 92 93 94 95 96 97 Write("Street address: \t"): string street - ReadLine(); Write("City: \t\t\t"); string city ReadLine(); 99 100 191 122 103 184 1e5 106 107 108 189 //validating state, it should be states only on the list otherwise ERROR MESSAGE Write("State (2-letters) \t"); string state - ReadLine(); while (state. Toupper() != "A2" state. Toupper() != "A2" state. Tolspert) != "CA" state. Toupper() = WriteLine("\ nERROR.We do not ship to (03", state): WriteLine("\t\tValid state codes are: AK, AZ, CA, CO, NM DA UT. *"): Write(" Please try again\t"); state = ReadLine(): 111 112 113 114 115 126 117 116 119 120 121 122 W Validating zip code, it must be 5 characters long, otherwise ERROR MESSAGE Write("Zip code: \t\t"); string zip = ReadLine(): while (zip.Length = 5) WeiteLine("ERROR. Zip code must be 5 characters long"): Write("Please try again:\t"); write("zip code: 11 zip ReadLine(); 12 Page 2 13 112 33 133 11 114 27 112 Writet SCRIPTAre you a nenber of our futitty frequent shopper program, (y if year) futility eber = Readine 18 (utilityMember Topper{ } */ ENOT Writel"SCRIPT: what's wrong with you? That just cost you a 15% discount and an opportunity to win a gallon af invisible paint. Sad."): ) else i (futittyenber. Touspere fres 140 Writet" ASCRIPT: Excellent you'll receive an AMAZONE 150 discount on today's purchase what's more values were of our loyalty program, you'll be randorumber = RandonClass.extin. Max + 1); QUESS = R.Parse(ReadLine() I guess 5/der the between 1 and weite SCRIPT That's not number between 1 and S. what a naroon sul ve velve your loyalty."). else if (guess is randonlumber} // If at the correct number Write WOIPT: Aw, too bad. You guessed out the secret mer was () He paint. What a loser. Very and", quess, randon unber) else if (es randonnber the correct Write OKIPT: No hoo! You gumised the secret under(). Agallan af ACHEILU Paint headed your way! randomberi LSO 156 / store weitelinePress any hey 10 display nice...) Resey WriteLine" WriteLine) WriteLine ACHE AWAS Corporation Mas infantil Pring in the cele WriteLine("VACOSTORU INVOICE) WriteLIWA TO:) WriteLine, WIELO, streets WriteLinetyl WELLINO, writeLine". 110 143 1/Shows dat ons and cost per al WriteLine("(.-2011, 12)", "antityitquantity) IF (quantity as 1 quantity cost. costiscount WriteLine(0-20)4,11). "Cost per savali", cost.ToString(23) 112 133 10 else if (quantity 10 4 quantity 101 Cost castiscount: WriteLine1,-20X1,319", "cost per atti", cost.ToString(2 else if (quantity 20) 1 200 201 202 Page 3 205 206 207 200 209 eise 11 (Quantity 20) cost = costDiscount); WriteLinet".-2021,111". "Cost per ahvile, cost.ToString(2) else () /Cost depends on cuantity of avtu. Prices are in constant variables if (quantity 16 quantity 211 2 215 216 else if (quantity 20) 20 219 220 221 222 223 224 subtotal = costDiscount) quantity WriteLine(0.-2015, 11", "Subtoteli", subtotal.ToString("c2" else Ir customer na Menterstie will have prethe discount decoltilityClubDiscount = 0; IF (futility ember - Il futilityfferbery 14 futilityClubDiscount = decimal. Round isubtotal discount, 2); /USING DECAL ROUND WriteLine(0.-20%(1,0))", "Less 156 Futility Clubs". FutilityClubbiscount) taxable nount = subtotal-futilityClutoiscount: WriteLine.-2019,111". "Table unti, taxabletount.ToString2) 220 227 225 220 238 221 222 233 234 235 236 23 235 230 240 241 202 24 244 245 240 247 248 248 250 251 252 253 254 255 256 257 I Countingtak for enters If futilitytenter. Toupper() - *** tax = (taxableAmount taxrate) / 100 > else (tax = (subtotal. takratel / 100> WriteLine("{0.-2012,11)", "Sales Taxi", tax.ToString("c2")); //CHANCED shipping cost = shippingPrice + quantity: Writeline("0.-20X5,11)". "Shipping, shippingcost.ToString("") weiteLine("title EF (futility ember. Toupper() == "") 250 200 261 263 264 total = taxable nount + taxe shopingCost WriteLine!" (0.-2012, 111", "TOTALI", total.ToString("c2")); } else 266 267 total = subtotal + tax+ shippingcesti WriteLine(0.-2015, 111". "TOTALE", total.ToString("02"); 269 270 242 2013 244 Page4 tax = (taxable nount. taxrate) / 180: > else 200 242 245 {tax = subtotal = taxatel / 108;> WriteLine(-20H1,111, Sales Tax?", tax. Testring(2) 250 251 302 253 254 355 256 257 358 //DWNGED shippingCast shipping Price quantity: WriteLine(.-20X1, 11. Shipping: thipping cost.ToString"c2"); WriteLine("\t\tyt if (futility Henber. Toupper() ="V 23 total = taxablett + tax shipping costs 263 264 WriteLine(0.-2031,311". "TOTALI", total.ToString "0")) ) else 206 267 266 total = subtotal + tax + shippingCost; WriteLine(0.-2015.11", "TOTALI", total.ToString(2) 270 221 22 1.2 Writer'SCRIPT:And congratulations on winning FREE Invisible Paint): NEED TO FINISH lyst Customer wins, thou this secage 275 216 277 2018 201 22 200 204 203 23 283 WriteLine" "); WriteSCRIPT: Your total today is .*, total.ToString""); WriteLine! Thanks for shopping with Acne!") WriteLine("VASCRIPT: 't forget Act wvils fly father, drop faste, and land harder than any other is in the market!"); wille to asked the customer to order again or not 22 WriteLinelineady to take another arder order Again = ReadLine(): If forderAgkin.Tolipper() != " u arder again. Totieper() =) { 209 290 291 292 29 204 299 290 247 WriteLinel "Please enter " or ".) 3 299 300 361 while (orderAgain. Toupper() ! **" order Again.Toupper) ! "); Wie (ardengkin. Toppert) = ""> 13 304 } while fututymerber. Toupper() = * Il futilityHerber.Toppert) = ""); white order again. Topper) : 37 ReadKey(); 310 Countdown to Order: Nick ****** NEW ORDER --****** SCRIPT: H1, I'm Nick. How many anvits would you like to order today? Number of anvils: 3 SCRIPT: I can certainly help you with that. Could you please give me your nane and address? First and last name: Street address: Broadway City: New Jercey State (2-letters): CA Zip code: 11111 SCRIPT: Are you a member of our futility frequent shopper program, (Y if yes) y SCRIPT: Excellent! You'll receive an AMAZING alued member of our loyalty program, you'll have a chance to win a bonus gift in our exciting Members-only gallon of invisible paint contest! Pick SCRIPT: Aww, too bad. You guessed but the secret number was 2 No paint. What a loser. Very sad. Press any key to display invoice... av ACHE Anvils Corporation CUSTOMER INVOICE SHIP TO: NICK Broadway New Jercey CA 11111 Quantity: Cost per anvil: $80.00 Subtotal: $240.00 Less 154 Futility Club:( 36.00) Taxable amounti $204.00 Sales Taxi $20.30 Shipping: $297.00 TOTAL: $521.30 SCRIPT: And congratulations on winning FREE Invisible Paint!!!**** SCRIPT: Your total today is $521.38. Thanks for shopping with Acme! SCRIPT: don't forget: Acne anvils fly father, drop faste, and land harder than any other anvils in the market! Ready to take another order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
