## Write a Java Program to find the largest value among two numbers
public class LargestOfTwoNumbers { public static void main(String[] args) { int num1 = 10; int num2 = 20; if (num1 > num2) { System.out.println("The largest number is: " + num1); } else { System.out.println("The largest number is: " + num2); } } } |
No comments:
Post a Comment