see, check this, this is why I may not be understanding something. All this program does is covert your dollar amount you put in to pounds using a conversion factor of 2$ per pound(britain money type, in case someone don't know).
Code:
#include <stdio.h>
int convert(void);
int main(void)
{
int pounds;
pounds = convert();
printf( "That is %d pounds\n", pounds );
return 0;
}
int convert(void)
{
int money, pounds;
printf( "Enter your dollars ");
scanf( "%d", &money );
return money/2;
}
see, well I just don't get it, there is a void for the parameteres of the function. I am having trouble understanding that in my mind, because it looks like my convert() function I made does return a value, that is, it returns "money/2"
I though void was only ok to use when you are NOT returning a value. Hmmm, I am very picky but I need to know and understand, thanks in advance peeps.