write a progam to print even or odd number in c++
Answers
Answered by
0
Answer:
इसके परिणाम दिखाए जा रहे हैं write a program to print even or odd number in c++
इसके बजाय इसे खोजें write a progam to print even or odd number in c++
#include <iostream> using namespace std; main() { int n; string arr[2] = {"Even", "Odd"}; cout << "Enter a number: "; //take the number from the user cin >> n; (n & 1 && cout << "odd")|| cout << "even"; //n & 1 will be 1 when 1 is present at LSb, so it is odd
Similar questions
CBSE BOARD XII,
1 month ago
Math,
1 month ago
CBSE BOARD XII,
1 month ago
Math,
11 months ago
Hindi,
11 months ago