Program 23:- Write a program to read two numbers from the user. Display the result using bitwise & operator on the numbers.
Answers
Answered by
3
num1 = int(input('Enter First Number: '))
num2 = int(input('Enter Second Number: '))
print(num1, ' & ' ,num2, ' = ', num1 & num2)
*Output*
#Test Case 1
Enter First Number: 1
Enter Second Number: 3
1 & 3 = 1
#Test Case 2
Enter First Number: 5
Enter Second Number: 6
5 & 6 = 4
Similar questions