this is what i have so far later i will add a step but 'farn' returns a large number like 2 million or something
Code:
#include <stdio.h>
int main(void)
{
int index = 0;
double tempc;
double farn = 0;
/*°C = (°F - 32) / 1.8
°F = °C × 1.8 + 32*/
printf("Enter temperature in celsius:");
scanf("%d",&tempc);
printf("------------------------------\n");
while(index<=5)
{
farn= tempc * 1.8 +32;
printf("| %d | %d |\n",tempc, farn);
index++ ;
}
printf("------------------------------\n");
return(0);
}
can anyone see why it isnt working?