Computer Science, asked by satywanti74, 1 year ago

Write a program to print sum of three given numbers 1221

Answers

Answered by BrainlyPromoter
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