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

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

TutsMaster.org

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.