Question: 2. Translate to C# the following Java code: 9 10 1 package lessons; 2 3 import java.util.Scanner; 4 S public class Reportsun3 6 public static

 2. Translate to C# the following Java code: 9 10 1

2. Translate to C# the following Java code: 9 10 1 package lessons; 2 3 import java.util.Scanner; 4 S public class Reportsun3 6 public static void main(String args) { 7 Scanner se - new Scanner(System.in); 8 // Prompt the user to enter the first integer System.out.println("Enter the value for 'o' and press Enter: "); 11 int . sc.nextInt(); 12 1/ Prompt the user to enter the second integer 13 System.out.println("Enter the value for 'b' and press Enter: "); 14 int b. sc.nextInt(); 15 16 Iclose the Scanner. It's a good practice to release the resource that was acquired 17 sc.close(); 19 1/ Display the result System.out.printf("Provided Integers: 34d and X4d, the total is $5d ", #, b, (a + b)); 21 > 22 ) Provide your source code and output in the form ReportSum3 (Java Application) C:\Program Files\Java\jdk Enter the value for 'a' and press Enter: 2. Enter the value for 'b' and press Enter: 5 Provided Integers: 2 and 5, the total is 7 ReportSum [Java Application) C:\Program FilesVava\jdk Provided Integers: 2 and 5, the total is 7 Provided Integers: 4 and 4, the total is 8 Provided Integers: 1800 and 2000, the total is 3000 Provided Integers: 100 and 101, the total is 201

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!