This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

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.

Parents
  • 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.

Reply
  • 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.

Children