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
RE: program
Per Westermark
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.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.