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
Create a program that will ask the user to input the average temperature a day and store it in an Array. Your array should contain days in a week and temperature each day. Display the average temperature in a week, and the day(s) with the highest temperature and lowest temperature.
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.
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