User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 396,965 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,911 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 450 | Replies: 3
Reply
Join Date: Mar 2008
Posts: 4
Reputation: hassanawdah is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hassanawdah hassanawdah is offline Offline
Newbie Poster

Can you help me to write this program?

  #1  
May 11th, 2008
Welcome
I have small project but I can't understand it.
I hope from the members help me in this.
thank you
--------------------------------------------------------
Q:
Problem:
You’re writing code for an embedded processor for automobile safety. In the final system the car speed will be detected automatically, but in your sample program you will ask the user to input a code indicating the speed. Your system will then display a safety message.

You must have three functions/procedures:

1. A main control procedure.

2. A procedure asking the user to input code indicating speed (km/h) or the exit code.
A or a: 0 – 30
B or b: 31- 75
C or c: 76- 120
D or d: 120+
E or e: exit

3. A procedure which will display a message based on the code obtained above.
For A: Beware of people and cars. Obey lane rules. Park legally.
For B: Watch out for red light or stop sign at next intersection.
For C: Go 10km/h slower and arrive safely only about 3 minutes later.
For D: Don’t kill someone.
For E: Drive safely, goodbye
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,337
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 20
Solved Threads: 376
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: Can you help me to write this program?

  #2  
May 11th, 2008
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Mar 2008
Posts: 4
Reputation: hassanawdah is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hassanawdah hassanawdah is offline Offline
Newbie Poster

Re: Can you help me to write this program?

  #3  
May 11th, 2008
Thank you Mr.Salem
I want to say to you I try many times but I can't solve.
if you can help me I want that.
Reply With Quote  
Join Date: Dec 2005
Posts: 3,337
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 20
Solved Threads: 376
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: Can you help me to write this program?

  #4  
May 11th, 2008
I'm not asking you to post the whole answer, just an honest attempt at trying to solve it yourself.

Then we can help you with what's really bugging you and not as it would seem at the moment, looking for a free pass.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Assembly Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Assembly Forum

All times are GMT -4. The time now is 8:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC