BIG problem-O with a C program
argh, no matter what i try i can't seem to get this code right... the output should look like this:
% wizard
Welcome to "Weather Wizard" Unit Convertor!
Please enter values in 'ENGLISH' units:
Enter Fahrenheit temperature: 86
Enter pressure in inches: 29.53
Please enter values in 'METRIC' units:
Enter Celsius temperature: 20
Enter pressure in millibars: 1000
Wind Calculator
Enter miles and feet traveled: 1 1000
Enter number of minutes and seconds elapsed: 1 28
Humidity Calculator
Enter Fahrenheit air temperature and dew-point temp: 86 86
**********
English to metric conversion
Temperature: 86 Fahrenheit 30 Celsius
Pressure: 29.53 inches 1000 millibars
Metric to English conversion
Temperature: 20 Celsius 68 Fahrenheit
Pressure: 1000 millibars 29.53 inches
Wind Calculator results
Wind: 71.36 feet/sec 49 mph 42 kt
Humidity calculator results
Temperature 86 degrees F dew point 68 degrees F Relative Humidity 55%
---------------MY CODE (so far)------------------------>
/* Project 1 */
#include <stdio.h>
int main()
{
int Fahrenheit, Celsius, pressure, miles, feet, minutes, seconds, air, dew;
float inches;
printf("Welcome to \"Weather Wizard\" Unit Convertor!\n");
printf("Please enter values in 'ENGLISH' units: \n");
printf("Enter Fahrenheit temperature: ");
scanf("%d", &Fahrenheit);
printf("\n");
printf("Enter pressure in inches: ");
scanf("%.2f", &inches);
printf("\n");
printf("Please enter values in 'METRIC' units: \n");
printf("Enter Celsius temperature: ");
scanf("%d", &Celsius);
printf("\n");
printf("Enter pressure in millibars: \n");
scanf("%d", &pressure);
printf("\n");
printf("Wind Calculator\n");
printf("Enter miles and feet traveled: \n");
scanf("%d %d", &miles, &feet);
printf("Enter number of minutes and seconds elapsed: ");
scanf("%d %d", &minutes, &seconds);
printf("\n");
printf("Humidity Calculator\n");
printf("Enter Fahrenheit air temperatre and dew-point temperature: ");
scanf("%d %d", &air, &dew);
printf("\n");
printf("**********\n");
return 0;
}
... i have all the temp conversions, etc. btw~