Hey everyone!
I have this table that gives a few values with the basic conversion from Fahrenheit to Celsius. Can someone please add code that asks the user for a starting value, ending value and the increment that the table increases by?
So the start (first fahrenheit value), end (last fahrenheit value), increment (Amount it goes up by each time).
Thanks a toooon guys!
Code:
#include <stdio.h>
int main()
{
float fahrenheit;
float Celcius;
printf("Input Fahrenheit");
scanf("%f", &fahrenheit);
float degF;
degF=0;
while (degF <= 100)
{
if (degF > 98.6)
{
printf("%6.2f degrees F = %6.2f degrees C\n", 98.6, (98.6 - 32.0) * 5.0/9.0);
}
printf("%6.2f degrees F = %6.2f degrees C\n", degF, (degF - 32.0) * 5.0/9.0);
degF = degF + 10;
}
return 0;
}