Turn Desktop View Off
by Dinesh Thakur

In this program user checks the logic about numeric value that will it be Division able with 5 or not. To check this declares a variable of integer type. And a logic will be used along with the Modulus operator(%).that will be manipulate with the numeric value and control statement (if-else) used if the numeric value is dividable than output will be ok else it will be reverse. 

Problem Statement:
This is the program to check whether the Numeric value is division able with 5 or Not.

  1. Enter Numeric value.
  2. Use Logic to manipulate.
  3. Declare if-else Condition.
  4. Displaying output on the Display.

Here is source code of the C program to Check out The Numeric value is Division able with 5 or Not. The C program is successfully compiled. The program output is also shown below.

#include<stdio.h>

void main()
{
         int a;
         clrscr();
         printf ("Enter the no.");
         scanf("%d",&a);
         if(a%5==0)
          {
             printf("No.is Divisible by 5");
          }
         else
         {
               printf("No is not Divisible by 5");
         }
               getch();
}

Check the Number Divisible by 5 or Not

Follow us