Hello guys..I'm working on a program which determine if numbers divided have remainders or not.
If they have remainders it prints out "Arcanum!" If they don't it prints out the answer.
But I'm having a problem...the program should also print "Arcanum" if the second input is 0.
I've tried to but I keep not getting it right
ANY HELP WILL DO
#include<iostream>
using namespace std;
int main()
{ int a,b,div;
cout <<"Enter value of a:" <<endl;
cin >> a ;
cout << "Enter value of b:" <<endl;
cin >> b ;
div= a/b;
if (b==0)
cout << "Arcanum!";
else if (a%b == 0)
cout << div ;
else
cout << "Arcanum!";
}