solve this question speedily if anybody solve then I think he or she is BRAINLIST
Attachments:
Answers
Answered by
2
Answer:
/**
C program to check given number
is divisible by A and B
Here, A and B are integers
*/
#include <stdio.h>
//function will return 1 if given number is
//divisible by both numbers a and b
int CheckDivision(int num, int a , int b)
{
//we have to check whether num is
//divisible by a and b
if( num%a==0 && num%b==0 )
return 1;
else
return 0;
}
// main function
int main()
{
int number=0,A=0,B=0;
printf("Enter any integer number : ");
scanf("%d",&number);
printf("Enter first divisor : ");
scanf("%d",&A);
printf("Enter second divisor : ");
scanf("%d",&B);
if(CheckDivision(number,A,B))
printf("%d is divisible by %d and %d\n",number,A,B);
else
printf("%d is not divisible by %d and %d\n",number,A,B);
return 0;
}
Similar questions
Psychology,
5 months ago
English,
5 months ago
Math,
5 months ago
Social Sciences,
10 months ago
Math,
10 months ago
Hindi,
1 year ago