Quote:i searched the internet but didnt managed to find the solution..to me the program looks good
Checking your course notes, or the C-language documentation would be a better idea.
You have the following:
printf("%d is divisible to %d" , &a ,&d);
The format string states that the two parameters are integer values, but you are passing the addresses of the variables. The
function does not need to modify the variables, so it does not need the
) on the variable names. Change that line to:
printf("%d is divisible to %d" , a ,d);