Write a complete Java program to input (through parameters) two digits
numbers and find the sum of two digits . Display sum.
Answers
Answered by
3
Answer:
class Paraminput{
public static void main(int a, int b) { //Accepting input through parameter
int s=a+b; //Calculating sum
System.out.println("Sum of two digits="+s) ; //Displaying sum
}
}
Sample Run:-
Input(through parameter) :-
int a=2
int b=1
Output:-
Sum of two digits=3
=>Check attachment
Attachments:


Similar questions