C program to the input number is divisible by 9 and 11 or not

Previous
Next
#include <stdio.h>
int main()
{
	int num;
	
	printf("Enter any number: ");
	scanf("%d", &num);
	
	if(num%5==0 && num%11==0)
	{
		printf("%d is divisible by both 5 & 11\n", num);
	}
	else
	{
		printf("Not divisible by 5 and 11\n");
	}
	return 0;
}
Previous
Next

Add Comment

Courses Enquiry Form