I'm trying to convert values of an array from C to F.
So far I have the user inputting values for each element (15 in the array which is defined). And I've figured out how to print each element, im just not sure how to apply the equation F = 32 + C*(180.0/100.0) so I can convert each element.
Code:
#include <stdio.h>#include <stdlib.h>
#define COUNT 15
int main(void){
int C, i;
int array[COUNT];
float F;
printf("Enter 15 temperatures in Celsius\n");
for(i=0;i<COUNT;i++){
scanf("%d", &array[i]);
}
for(i=0;i<COUNT;i++){
printf("%d\n", array[i]);
}