4.WAP to find the sum of any two integer numbers without using "+" operator.

 4.WAP to find the sum of any two integer numbers without using the "+" operator.

METHOD 1:

CODE:

a=int(input("Enter the 1 number "))
b=int(input("Enter the 2 number "))
sum=a-(-b)
print("Addition of two number is ",sum)


OUTPUT:

Enter the 1 number 7
Enter the 2 number 6
Addition of two number is  13


METHOD 2:

CODE:

a=int(input("Enter the 1 number "))
b=int(input("Enter the 2 number "))
sum=(a-b)/(a**2-b**2)
print("Addition of two number is ",sum)


OUTPUT:

Enter the 1 number 7
Enter the 2 number 6
Addition of two number is  13

Comments

Popular posts from this blog