Content-Length: 535 | pFad | https://github.com/sagargoswami2001/Java-Lab-File-Programs/raw/refs/heads/main/Q1_CLI_Argument.java
gth: 523 //Q1. WAP to enter two numbers using command line argument and calculate their sum and multiplication. package JAVA_Lab_File; public class Q1_CLI_Argument { public static void main(String[] args) { int sum = Integer.parseInt(args[0]) + Integer.parseInt(args[1]); int multiplication = Integer.parseInt(args[0]) * Integer.parseInt(args[1]); System.out.println("Sum of two CLI Arguments: " + (sum)); System.out.println("Multiplication of two CLI Arguments: " + (multiplication)); } }Fetched URL: https://github.com/sagargoswami2001/Java-Lab-File-Programs/raw/refs/heads/main/Q1_CLI_Argument.java
Alternative Proxies: