I am currently taking a C programming course via the internet and need help. I cannot figure out what I am doing wrong within the coding that I have created. I am supposed to be creating my own functions right now, and thought that I was, but apparently not. When I run this code it ask for the input and then does nothing. Any help would be much appriaciated.
Code:
#include <stdio.h>
int i;
int liquid1 (int);
int liquid2 (int);
int liquid3 (int);
int liquid4 (int);
int main()
{
printf("Enter cups to be converted:");
scanf ("%d\n",&i);
printf ("gallons = %d\n",liquid1 (i));
printf ("quarts = %d\n",liquid2 (i));
printf ("pints = %d\n",liquid3 (i));
printf ("cups = %d\n",liquid4 (i));
system ("PAUSE");
return 0;
}
int liquid1 (i)
{
int s,g;
g = s/16;
return (g);
}
int liquid2 (i)
{
int f,q;
q=(f%16)/4;
return (q);
}
int liquid3 (i)
{
int d,p;
p=((d%16)%4)/2;
return (p);
}
int liquid4 (i)
{
int l,c;
c=((l%16)%4)%2;
return (c);
}