Write a program to add two numbers and print their sum.
Answers
Answered by
5
Question:-
- Write a program to add two numbers and display their sum.
Program:-
This is written in Python.
a=int(input("Enter a: "))
b=int(input("Enter b: "))
s=a+b
print("Sum is: ",s)
Answered by
1
This is written in java
import Java.until.*;
class Sum
{
void Sum()
{
Scanner sc= new Scanner (System.in);
System.out.println(“ Enter value of A”);
import Java.until.*;
class Sum
{
void Sum()
{
Scanner sc= new Scanner (System.in);
System.out.println(“ Enter value of A”);
Similar questions