Addition program in java with source code


Addition of two number

in this  program user will not  enter number form the keyboard. Value is fixed and you can see out put on the screen

Source Code
import java.io.*;
import java.util.*;
class Add
{
public static void main(String[] args)
{
//Scanner ob=new Scanner(System.in);
System.out.println(“given value of a=5 and b=8”);
int a=5
int b=8
int c=a+b;
System.out.println(“sum of c:”+c);
}
}

Have any Question or Comment?

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories