stray 240 in program error

hi there I have a code wrote for converting feet and inches to meters and centimetres. but I'm getting a heap of errors saying 240 in program error, can any tell me what is causing this how how can I fix it ? thanks in advantaged

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#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, &centimeters);
 output(feet, inches, meters, centimeters);
 return 0;
}
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 = floor(i)
}
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);
}
Last edited on
I found my problem, I had to stick all my code tight to the left for it to compile
Topic archived. No new replies allowed.