C program to check entered number is exactly divisible by 5 but not 11

C program to check entered number is exactly divisible by 5 but not 11, Write a program that checks whether the number entered by user is exactly divisible by 5 but not by 11.

Write a program that checks whether the number entered by user is exactly divisible by 5 but not by 11.

Write a c program to find entered number exactly divisible by 5 but not by 11.

C Code


#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
  
  int number; 
  
  printf("enter number:");
  scanf("%d", &number);
  
  if(number%5==0 && number%11!=0)
    printf("%d is divisible by 5 but not by 11", number);
  else 
    printf("condition is not satisfied");
    
  getch();
}

Output

divisible by 5 but not 11

divisible by 5 but not 11

You May Also Like...