Purchase Solution

a function that uses a switch statement to determine the number of the nearest cross street for a given address and avenue number according to the preceeding alogorithm

Not what you're looking for?

Ask Custom Question

Given: To locate the nearest numbered cross street for a given avenue address, the following algorithm can be used: cancel the last diget of the address, divide by 2, and add or subtract the number given in the following abbreviated table:

1st Ave. add 3
2nd Ave. add 3
3rd Ave. add 10
4th Ave. add 8
5th Ave. up to 200 add 13
5th Ave. up to 400 add 16
6th Ave. (Ave. of the Americas) Subtract 12
7th Ave. add 12
8th Ave. add 10
10 Ave. add 14

Write a function that uses a switch statement to determine the number of the nearest cross street for a given address and avenue number according to the preceeding alogorithm. Then write a program to test your function.

Purchase this Solution

Solution Summary

Write a function that uses a switch statement to determine the number of the nearest cross street for a given address and avenue number according to the preceeding alogorithm.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

C# variables and classes

This quiz contains questions about C# classes and variables.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.