Computer Applications
Answer
public class KboatSumAvg
{
public static void computeSumAvg(int a, int b, int c) {
System.out.println("The three numbers are "
+ a + ", " + b + ", " + c );
int sum = a + b + c;
double avg = sum / 3.0;
System.out.println("Sum = " + sum);
System.out.println("Average = " + avg);
}
}
Output
Related Questions
Write a program to print your Name, Class, Roll_No, Marks and Age. Name this file, 'MyProfile'.
Write a program to print your School name four times in separate lines.
Write a program to calculate the compound interest.
Write a program to interchange the value of two numbers without using the third variable.