#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
long int a,b,c;
cout<<"Enter the no. (divisor) ";
cin>>a;
cout<<"Enter the no. (dividend) ";
cin>>b;
c=a%b;
if (c==0)
{ cout<<a<<" is perfectly divisible by "<<b;
}
else
{ cout<<a<<" is not divisible by "<<b;
}
getch();
}
#include<conio.h>
void main()
{
clrscr();
long int a,b,c;
cout<<"Enter the no. (divisor) ";
cin>>a;
cout<<"Enter the no. (dividend) ";
cin>>b;
c=a%b;
if (c==0)
{ cout<<a<<" is perfectly divisible by "<<b;
}
else
{ cout<<a<<" is not divisible by "<<b;
}
getch();
}
No comments:
Post a Comment