Computer Applications
Answer
public class KboatLargestNumber
{
public static void largestNumber(int a, int b, int c) {
System.out.println("The three numbers are "
+ a + ", " + b + ", " + c);
System.out.print("Largest Number: ");
if (a > b && a > c)
System.out.println(a);
else if (b > a && b > c)
System.out.println(b);
else
System.out.println(c);
}
}
Output
Related Questions
Write a Java program using the switch case to print the corresponding days of numbers.
For example: 1= Monday…. 7 = Sunday
Write a program to print the Fibonacci series upto 10 terms.
[A series of numbers in which each number is the sum of the two preceding numbers.For example: 0,1,1,2,3, …………… n].
Create a program to display whether the entered character is in uppercase or lowercase.
Write a program to print all the prime numbers between 1 and 100.