Expand|Select|Wrap|Line Numbers
- #include <stdio.h>
- #include <stdlib.h>
- int
- main(void)
- {
- float numerator, denominator, result;
- int quot;
- int rem;
- div_t;
- printf("Please enter numerator.\n");
- scanf("%f" ,&numerator);
- printf("Please enter denominator.\n");
- scanf("%f" ,&denominator);
- result=div(numerator,denominator);
- printf("That equals %f and the remainder is %f\n", quot, rem);
- return (0);
- }
intdiv.c: In function main:
intdiv.c:14: warning: useless type name in empty declaration
intdiv.c:20: error: incompatible types in assignment
What am I doing wrong and how can I fix it?