Keil Logo Arm Logo

Discussion Forum

program

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
f naga
Posted
11-May-2012 08:15 GMT
Toolset
C51
New! program

Hi,

Am trying to develop a mathematical program to calculate time when speed and distance are given.

How can I get user input ie, the distance and speed.

How can I calculate time.

And then to calculate and display the results.

Please help.

Read-Only
Author
Per Westermark
Posted
11-May-2012 08:57 GMT
Toolset
C51
New! RE: program

Haven't your teacher already covered these basics?

How to enter input? That obviously depends on what hardware you have. Maybe using a serial port with a terminal application. Print prompt. Wait for digits + enter. Maybe LCD + keypad.

How to calculate? The C language do have support for + and * so what is the issue?

How to display the result? Wouldn't that also depend on your hardware? Print the result on the serial port or a connected LCD.

You really do have to follow what is teached at school. If not, you will only be further and further behind.

Read-Only
Author
f naga
Posted
11-May-2012 13:27 GMT
Toolset
C51
New! RE: program

can anyone help.

Read-Only
Author
Per Westermark
Posted
11-May-2012 13:29 GMT
Toolset
C51
New! RE: program

With what? Doing your school assignment for you?

Where are you stuck?

Have you talked with your teacher yet?

Read-Only
Author
Tamir Michael
Posted
11-May-2012 13:47 GMT
Toolset
C51
New! RE: program

Wanna bet his next reply is "can anyone help." ?

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.