Write an algorithm to check the given number is odd/ even?
Answers
Answered by
5
Answer:
Step 1 : Start
Start 2 : Read n
Start 3 : if (n%2 == 0),
print " even number"
else
print " odd number"
Start 4 : Stop
Answered by
0
In C++
include <iostream>
using namespace std;
int main(){
int number;
cin >> number;
if (number%2 == 0)
{
cout << "Odd Number" << endl;
} else {
cout << "Even number" << endl;
}
}
Similar questions
Math,
6 months ago
English,
6 months ago
English,
6 months ago
Social Sciences,
1 year ago
History,
1 year ago
Social Sciences,
1 year ago