Friday, June 22, 2018

Write a program In which All operation perform


1-addition
2-Subtraction
 3-division
4-multiplication
...........................................

Also Contain Retry option when You Enter No- 'N' or 'n' Then exit whole program
__________________________________________________________________________________________________________________________________________________________________
Try In Python /C++/C/java   etc....

1 comment:

  1. SOL IS.....


    num1 = int(input('Enter First number: '))
    num2 = int(input('Enter Second number '))

    add = num1 + num2
    dif = num1 - num2
    mul = num1 * num2
    div = num1 / num2
    floor_div = num1 // num2
    power = num1 ** num2
    modulus = num1 % num2

    print('Sum of ', num1, 'and', num2, 'is :', add)
    print('Difference of ', num1, 'and', num2, 'is :', dif)
    print('Product of ', num1, 'and', num2, 'is :', mul)
    print('Division of ', num1, 'and', num2, 'is :', div)
    print('Floor Division of ', num1, 'and', num2, 'is :', floor_div)
    print('Exponent of ', num1, 'and', num2, 'is :', power)
    print('Modulus of ', num1, 'and', num2, 'is :', modulus)

    ReplyDelete