Learn C ProgrammingLearn ProgrammingPrograms On Decision Control StructuresResources

018. Write a program to accept a number from user and print if it is divisible by 5 in C language

By September 18, 2012 February 5th, 2018 No Comments
#include<stdio.h>
#include<conio.h>  
main()
{
 int n;
 clrscr();
 printf("Enter number...");
 scanf("%d",&n);
 if(n%5==0)
	printf("Number is divisible by 5.");
 else
	printf("Number is not divisible by 5.");
 getch();
}



Leave a Reply

DEMO01