Write a program to print sum of three given numbers 1221
Answers
Answered by
1
Answer:
NOTE: This program is written in Java programming language, but logic can be followed for other languages as well.
Program(Source Code) :
public class BrainlyHelp{
public static void main(int a, int b, int c) {
System.out.println("Entered numbers are:") ;
System.out.println(a+", "+b+", "+c);
int sum = a + b + c;
System.out.println(" Their sum = "+sum) ;
}
}
Input:
1
3
10
Note: You may pass any desired input.
Output:
Entered numbers are:
1, 3, 10
Their sum = 14
Similar questions
Math,
6 months ago
Environmental Sciences,
6 months ago
History,
6 months ago
Math,
1 year ago
Math,
1 year ago