I'm looking for a bit of help here with my program. I keep getting a error saying stray 240 in program on a lot of the lines in my code. can anyone show me were I went wrong and how do I fix it? any help would be great I'm stuck at this for the last 4 hours and cant solve it
Code:
#include <math.h>
void input(int *, int *);
void calculation(int, int, int*, int*);
void output(int, int, int, int);
int main()
{
int feet, inches , meters, centimeters;
input(&feet, &inches);
calculation(feet, inches, &meters, ¢imeters);
output(feet, inches, meters, centimeters);
void input(int *f, int *i)
{
printf("Enter feet:\n");
scanf("%d", f);
printf("Enter inches:\n");
scanf("%d", i);
}
void calculation(int f, int i, int *m, int *c);
{
*m=f*0.312;
*c=i*2.54;
}
void output(int f, int i, int m, int c)
{
printf("%d feet and %d inches converted is %d meters and %d centimeters \n", f, i, m, c);
}
do
{
printf("To go again press Y\n"); // send back to start
printf("To exit program press N\n"); // exits program
scanf("%c", &choice);
}
while(choice != 'Y' && choice != 'y' && choice != 'N' && choice != 'n');
while(choice == 'Y' || choice == 'y');
}
return 0;