Get Answers to all your Questions

header-bg qa

Write a program to read of ad two int values n1 and n2 . decide and print whether n1 is multiple of n2.

Answers (1)

best_answer

#include<stdio.h>

int is_Multiple(int n1, int n2)

    return n1 % n2 == 0;

int main()

    int n1, n2;
   
    printf( "Input the first integer : " );
    scanf("0", &n1);
    printf( "Input the second integer: " );
    scanf("0", &n2);

    if(is_Multiple(n1, n2))
        printf( " 0 is a multiple of 0. ", n1, n2 );
    else
        printf( " 0 is not a multiple of 0. ", n1, n2 );

    return 0;

Posted by

Deependra Verma

View full answer