|
From: Scott <fre...@ve...> - 2005-10-31 01:08:26
|
Okay another simple C question....
I would like to make a quick HP calculator in C.
(just mucking around with DevC)
I would like to ask for user input, and then show the total...
Something like:
#include <stdio.h>
main()
{
float Weight, Speed, Time;
printf("Enter the weight : ");
scanf("%f",&Weight);
printf("Enter the Speed : ");
scanf("%f",&Speed);
Time =3D Weight*Speed;
printf("\n Time is =A3%5.2f",total);
}
The formula is: hp =3D weight * (speed / 234)3
How does one used cubed? is it something like 234*x*x ?
Anyone shed some simple light...
The example above is just something i imagine it will look like...
Cheers,
Scott.
|