C Programming

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

Related Articles

Back to top button

Adblock Detected

Please turn off your Adblocker to view your content.