Computer Science, asked by prantkeshari677, 7 months ago

Write a program to read two numbers from user and add them. Print the output with suitable message.​

Answers

Answered by Kaushikkalesh
0

a = int(input())

b = int(input())

print("The Sum is ", a+b)

Answered by anindyaadhikari13
1

Question:-

Write a program to read two numbers and add them. Print the result.

Code:-

In Java,

class X{

public static void main(int a, int b) {

int c=a+b;

System.out.println("Sum is: "+c);

}

}

In Python,

a=int(input("Enter first number: "))

b=int(input("Enter second number: "))

c=a+b

print("Sum is: ",c)

Similar questions