Skip to content

Commit

Permalink
Merge pull request #2 from harshitjsurana/patch-1
Browse files Browse the repository at this point in the history
updated code for remainder
  • Loading branch information
harshitsurana authored Oct 1, 2019
2 parents b890534 + 68f94b4 commit 924b21f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions even no.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using namespace std;

int main()
{int num,rem;
{int number,remainder;
cout << "Enter a number:" ;
cin>>num;
rem=num%2;
if(rem==0)
cin>>number;
remainder=number%2;
if(remainder==0)
cout<<"It is a even number.";
else
cout<<"It is a odd number.";
Expand Down

0 comments on commit 924b21f

Please sign in to comment.