Thursday

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

#include<stdio.h>
#include<conio.h>
void main()
  {
    int n;
    clrscr();
    printf("\nEnter any number: ");
    scanf("%d",&n);
    if(n%5==0 && n%11!=0)
     printf("%d is exactly Divisible by 5 but not by 11",n);
    else
     printf("condition dissatisfied");
    getch();
  }

No comments:

Post a Comment

Rahul-Notes