What do you want to save?
Add Code snippet
New code examples
-
C++ 2022-03-16 23:40:31
c++ check if odd or even
#include <iostream> using namespace std; int main() { int n; cout << "Enter an integer: "; cin >> n; (n % 2 == 0) ? cout << n << " is even." : cout << n << " is odd.";... Add solution