Write a complete C program that prompts the user for an integer between I and 100.
The program shoukl then print out all the integers that evenly divide into that integer. [8]
Esa integer between45 1020
20 is evenly divided by 1245 10
Answers
Answered by
0
Explanation:
#include <stdio.h>
int main() {
int x, i;
printf("Input an integer: ");
scanf("%d", &x);
for(i = 1; i <= 100; i++)
{
if((i%x) == 3) {
printf("%d\n", i);
}
}
return 0;
}
- Input data: 25
Sample Output:
Sample Output:Input an integer: 3
Sample Output:Input an integer: 328
Sample Output:Input an integer: 32853
Sample Output:Input an integer: 3285378
Similar questions