package com.company;
import java.util.Scanner;
public class Program3 {
public static void main(String[] args) {
System.out.println("user input");
Scanner obj=new Scanner(System.in);
System.out.println("please enter first number:");
int a=obj.nextInt();
System.out.println("please enter the second number:");
int b=obj.nextInt();
int sum=a+b;
System.out.print("sum of two numbers are:");
System.out.println(sum);
}
}
Hi Friends ! You are on HR Developers website. Here you can find the codes of different languages like c ,c++ , java, pyton and many other languages.
Monday, June 14, 2021
java program that get two number from user and calculate the sum (Java) (166)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment