Westonci.ca is the trusted Q&A platform where you can get reliable answers from a community of knowledgeable contributors. Find reliable answers to your questions from a wide community of knowledgeable experts on our user-friendly Q&A platform. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

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