You are given two integers, say M and N.

You must check whether M is an exact multiple of N, without using

loops.

You have to output 0 if M is not a multiple of N.

You have to output M/N if M is a multiple of N.

0 votes

#include<stdio.h>

int m,n;

{

printf("enter the value of m");

scanf("%d",&m);

printf("enter the value of n");

scanf("%d",&n);

if(m%n==0)

{

printf("enter the value of m");

else

printf("enter the value of n");

}

return 0;

}

int m,n;

{

printf("enter the value of m");

scanf("%d",&m);

printf("enter the value of n");

scanf("%d",&n);

if(m%n==0)

{

printf("enter the value of m");

else

printf("enter the value of n");

}

return 0;

}

+1 vote

#include<stdio.h>

int main()

{

int M,N;

scanf("%d %d",&M,&N);

if(M%N==0)

printf("%d",M/N);

else

printf("0");

return 0;

}

int main()

{

int M,N;

scanf("%d %d",&M,&N);

if(M%N==0)

printf("%d",M/N);

else

printf("0");

return 0;

}

+1 vote

#include <stdio.h>

int main()

{

int m,n;

printf("enter m and n values:");

scanf("%d%d",&m,&n);

if(m%n==0)

{

printf("%d",m/n);

}

else

printf("%d",0);

return 0;

}

int main()

{

int m,n;

printf("enter m and n values:");

scanf("%d%d",&m,&n);

if(m%n==0)

{

printf("%d",m/n);

}

else

printf("%d",0);

return 0;

}

...