Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
Question
Book Icon
Chapter 6, Problem 5E
Program Plan Intro

Program Plan

1. Below mentioned variables are used

  • zipCodesstring array that holds 10 zip codes of deliverable locations.
  • zipInputinput zip code read from the console.
  • deliveryCharges −string array that holds delivery charges for deliverable locations.
  • deliveryCharge −delivery charge for the entered input zip code.
  • isZipValid − a boolean value that holds true if the entered zip code is available in zipCodes array

Program description:

This Program is for creating a console application that gets a zipcode as input from the user and checks whether the zip code is available for delivery. If it is available the program will display the corresponding delivery charge. If not available it will print an error message.

Blurred answer
Students have asked these similar questions
In C#, Write a program named CheckZips that is used by a package delivery service to check delivery areas. The program contains an array that holds the 10 zip codes of areas to which the company makes deliveries. (Note that this array is created for you and does not need to be changed.) Prompt a user to enter a zip code, and display a message indicating whether the zip code is in the company’s delivery area. For example if the user enters a zip code in the array, such as 60007, the output should be Delivery to 60007 ok. If the user enters a zip code not in the array, such as 60008, the output should be Sorry - no delivery to 60008.
Design a roulette wheel which allows the user to enter bets on multiple numbers. Allow the user to stop betting when they enter 0 on a bet. The program will then choose a random number between 0 and 36. If the user wins, they will get back 30 times the amount they bet on that number. The program will print out the winning number as well as how much they won or lost. Create an array to store the numbers the user bet on. Create a corresponding array to store the amount they bet on each number.o int[] bets=new int[36];//To store the person's betso int[] amount =new int[36];//To store the amount of the bet Ask them what numbers they want to bet on and how they want to bet. Store these in the arrays. The program chooses a winning random number. Check to see if any of their bets match the correct number. If they have the correct number tell them this and inform them as to how much they won or lost. If they did not get the correct number tell them this and tell them how much they…
Using C# in Microsoft Visual Studio Create an application that simulates a game of tic-tac-toe. The application should use a two-dimensional int array to simulate the game board in memory. When the user clicks the New Game button, the application should step through the array, storing a random number in the range of 0 through 1 in each element.The number 0 represents the letter O, and the number 1 represents the letterX. The form should then be updated to display the game board. The application should display a message indicating whether player X won, player Y won, or the game was a tie.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT