Boolean2. Given an integer A. Check the truth of the statement: "The number A is odd".

Solution in Python 3:

A = float(input("Enter the number (A): "))
x = A % 2
print("The number is odd: ",x == 1)

Solution in C++:

#include <iostream>
using namespace std;
int main(){
int a;
cout << "Enter the number A: ";
cin >> a;
cout << "A - odd number: " << (a%2==1) << "." << endl;
return 0;
}