C Program to read two numbers, check first number divisible by second or not

0
10
digitalample eye

C Program to read two numbers, check first number divisible by second or not.
Write a c program to read any two numbers, check first number is divisible by second or not.

C Code

#include<stdio.h>
#include<conio.h>

void main()
{

int first, second;

printf("nEnter two numbers:");
scanf("%d%d",&first, &second);

if(first%second==0)
printf("nFirst is divisible by second number");
else
printf("nNot divisible");

getch();

}

Output

C Program to read two numbers, check first number divisible by second or not

C Program to read two numbers, check first number divisible by second or not

LEAVE A REPLY

Please enter your comment!
Please enter your name here