IDNLearn.com: Your reliable source for finding expert answers. Discover in-depth and trustworthy answers to all your questions from our experienced community members.

input two numbers and print their sum products difference division and remainder​

Sagot :

[tex]\tt n1=int(input("Enter\: first\:no:"))[/tex]

[tex]\tt n2=int(input("Enter\: second\:no:"))[/tex]

[tex]\tt sum=n1+n2[/tex]

[tex]\tt diff=n1-n2[/tex]

[tex]\tt pdt=n1*n2[/tex]

[tex]\tt div=n1//n2[/tex]

[tex]\tt rem=n1\%n2[/tex]

[tex]\tt print("Sum=",sum)[/tex]

[tex]\tt print("Difference=",diff)[/tex]

[tex]\tt print("Product=",pdt)[/tex]

[tex]\tt print ("Division=",div)[/tex]

[tex]\tt print("Remainder=",rem)[/tex]

Output:-

Enter first no:4

Enter second no:3

Sum=7

Difference=1

Product=12

Division=1

Remainder=1

Thank you for using this platform to share and learn. Keep asking and answering. We appreciate every contribution you make. Find reliable answers at IDNLearn.com. Thanks for stopping by, and come back for more trustworthy solutions.