Program for Automatic Sum

 import java.util.*;
        public class As{
         public static void main(String args[]){
              Scanner sc=new Scanner(System.in);
         System.out.print("enter first number");
              int num1=sc.nextInt();
        System.out.print("enter second number");
               int num2=sc.nextInt();
          System.out.print("As is"+(num1+num2));
}}

No comments:

Post a Comment

How to install java   How to add two numbers in java How to compile the program How to subtract two numbers in java How to multiply two numb...