Hey everyone! I am rushing to finish my last Cprogramming homework question. However i am not that familiar with Calling functions and i was wondering if u guys can check out my program and educate me on what errors i made. (I know I should read up on this kind of stuff but i just have no time today) So please any help would be greatly appreciated. Thanks!
Code:
#include <stdio.h>
#include <math.h>
int main (void)
{
float a[6], b[6], p;
FILE *input;
FILE *output;
input = fopen("a7q2.in","r");
output= fopen("a7q1.out","w");
a[i]=read_data(float a[i]); //Reading Data
k[i]=temp_conv(float a[i], k[i], numbers); //Converting F to K
print2(float a[i], k[i]; //Printing to screen and
}
int read_data (float a[i])
{
fscanf(input,"%f",&a[i]);
}
int temp_conv(float a[i], k[i], numbers)
{
for (i=0, i<20, i++)
{
if (i=0)
{
numbers=a[i]
}
else if (i>0 && i<20)
{
k[i]=(a[i]-32)*(5/9)+273.15
}
}
print2(float a[i], k[i])
{
printf("The total number of the temperatures is: %f"
"Temp (F) Temp (K)"
"%.2f %.2f", numbers, a[i], k[i]);
fprintf(outfile,"The total number of the temperatures is: %f"
"Temp (F) Temp (K)"
"%.2f %.2f", numbers, a[i], k[i]);
}
please retain format as much as possible