2) Adding two number in Java
- Mahesh Bhat M
- Jun 29, 2017
- 1 min read
Program :
class add{ public static void main(String args[]){ System.out.println(" Adding two numbers !"); int a=10,b=20,c=0; c=a+b; System.out.println(" Sum is " +c); } }
Program which is typed in notepad++
The ouput for the above program ( using Command Prompt )
Comments