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

You have successfully subscribed to myprogrammingschool

There was an error while trying to send your request. Please try again.

My Programming School will use the information you provide on this form to be in touch with you and to provide updates and marketing.