write a program to read of ad two int values n1 and n2 . decide and print whether n1 is multiple of n2.
Answers
Answered by
0
#include <stdio.h>
main()
{
int n1, n2;
printf("Input n1 and n2\n");
scanf("%d %d", &n1, &n2);
if (n1 % n2)
printf("%d is not a multiple of %d\n",n1, n2);
else
printf("%d is a multiple of %d\n",n1, n2);
}
main()
{
int n1, n2;
printf("Input n1 and n2\n");
scanf("%d %d", &n1, &n2);
if (n1 % n2)
printf("%d is not a multiple of %d\n",n1, n2);
else
printf("%d is a multiple of %d\n",n1, n2);
}
Similar questions