473,387 Members | 1,844 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

need code for finding avenues

here is the problem

write a function tht uses a switch statement to determine the number of
the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.

1st ave +3
2nd ave +3
3rd ave +10
4th ave +8
5th ave up to 200 +13
5th ave up to 400 +16
6th ave -12
7th ave +12
8th ave +10
10th ave +14.

Dec 3 '06 #1
7 1418
* jo***********@us.army.mil:
here is the problem

write a function tht uses a switch statement to determine the number of
the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.

1st ave +3
2nd ave +3
3rd ave +10
4th ave +8
5th ave up to 200 +13
5th ave up to 400 +16
6th ave -12
7th ave +12
8th ave +10
10th ave +14.
Yep, that's in the FAQ: see FAQ item 5.2 (you can find the FAQ at <url:
http://www.parashift.com/c++-faq-lite/>).

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Dec 3 '06 #2
jo***********@us.army.mil wrote:
here is the problem

write a function tht uses a switch statement to determine the number
of the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.
That's not a problem for me, as I don't have do the homework. You do,
so it would be a good idea to show us what you've done so far, and
explain what is giving you problems.


Brian

Dec 3 '06 #3
<jo***********@us.army.milwrote in message
news:11**********************@16g2000cwy.googlegro ups.com...
here is the problem

write a function tht uses a switch statement to determine the number of
the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.

1st ave +3
2nd ave +3
3rd ave +10
4th ave +8
5th ave up to 200 +13
5th ave up to 400 +16
6th ave -12
7th ave +12
8th ave +10
10th ave +14.
Yep. That's a problem. But, we don't answer problems here, we answer
questions. And I don't see a question.

If your question is "will someone do my homework for me?" the answer is
"No."

Now, try to write the program. And when you get stuck post what you've
tried that didn't work.

int main()
{
}

is not enough :D
Dec 4 '06 #4
<jo***********@us.army.milwrote in message
write a function tht uses a switch statement to determine the number of
the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.
1st ave +3
2nd ave +3
3rd ave +10
4th ave +8
5th ave up to 200 +13
5th ave up to 400 +16
6th ave -12
7th ave +12
8th ave +10
10th ave +14.
You left out Broadway. You need to find the cross-streets
for addresses on Broadway also.

Steve
Dec 4 '06 #5
<jo***********@us.army.milwrote:
write a function tht uses a switch statement to determine the number of
the nearest cross street for a given address and avenue number
according to the preceding algorithm. the write a program to test the
function.

1st ave +3
2nd ave +3
3rd ave +10
4th ave +8
5th ave up to 200 +13
5th ave up to 400 +16
6th ave -12
7th ave +12
8th ave +10
10th ave +14.
Can you do this with pencil and paper? The first step is to get the probem
in your head. Can you draw a schematic map of this city? Your narrative
mentions avenues and streets and addresses but there are no streets or
addresses in your table. Units are important. Is 3 a street? Is there a
"minus 12th street"? Is 200 a street?
Dec 4 '06 #6
jo***********@us.army.mil wrote:
[blatant do-my-homework redacted]
You know, I believe that the US Army has an honor code, and having
someone else do your homework is most likely a violation of said code...

Dec 5 '06 #7
"red floyd" writes:
jo***********@us.army.mil wrote:
>[blatant do-my-homework redacted]

You know, I believe that the US Army has an honor code, and having
someone else do your homework is most likely a violation of said code...
The post was from Google groups, there is no reason to believe the address
you are referring to wasn't totally bogus.
Dec 5 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Google Mike | last post by:
I need help from PHP land. I've just completed an open source work order management system in PHP on Linux (RH9). I plan to use an Apache license, which was recommended by a friend, so that I can...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
55
by: Alex | last post by:
Hello people, The following is not a troll but a serious request. I found myself in a position where I have to present a Pro/Con list to management and architects in our company with regard to...
7
by: Alan Pretre | last post by:
I have an application installed at a customer site that has been getting a general network error for a couple of years. I was hoping that .NET 2.0 would clear it up, but unfortunately it didn't. ...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
0
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
6
by: ladybug76 | last post by:
Hello. I'm working in Access 2003 and I'm new to VBA. I'm trying to create a button on a form that will run my query (based on the 2 drop down box parameter selections made by the user). The...
8
by: perry.yuan | last post by:
Hi Gurus, I am looking for C code for multiplying 32bit by 32bit operands and getting a 64bit product. i.e. U32 m1, m2; U64 p = m1 * m2; Of course I can use
25
by: Oltmans | last post by:
Hi guys, I'm learning JavaScript and I need some puzzles that can make me a better JavaScript programmer. I mean I'm looking out for programming puzzles (e.g. Project Euler or TopCoder) but I'm...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.