public class ReportSum { public static void main(String args[]) { //assume we have 2 numbers a and b, a = 2, b = 5 int a = 2; int b = 5; System.out.println( "Provided Integers: + a + and + b + ", the total is " + (a+b)); //assume we have 2 numbers a and b, a = 4, b = 4 a = 4; b = 4; System.out.println( "Provided Integers: " + a + " and " + b + ". the total is " + (a+b)); //assume we have 2 numbers a and b, a = 1000, b = 2000 a = 1000; b = 2000; System.out.println( "Provided Integers: " + a + " and " + b + ". the total is " + (a+b)); //assume we have 2 numbers a and b, a = 100, b = 101 a = 100; b = 101; System.out.println( "Provided Integers: + a + and + b + ", the total is + (a+b));

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 14RQ
icon
Related questions
Question

TASK 1. Variables. Review variables, Implement the following code, make sure it runs without errors.

Change Summation Integers problem to Finding the minimum problem.

public class ReportSum {
public static void main(String args[]) {
//assume we have 2 numbers a and b, a = 2, b = 5
int a = 2;
int b = 5;
System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b));
8
9
//assume we have 2 numbers a and b, a = 4, b = 4
a = 4;
b = 4;
System.out.println( "Provided Integers:
10
11
13
+ a +
and
+ b
+ ", the total is " + (a+b));
15
//assume we have 2 numbers a and b, a = 1000, b = 2000
a = 1000;
b = 2000;
System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b));
22
23
24
//assume we have 2 numbers a and b, a = 100, b = 101
a = 100;
b = 101;
System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b));
}
25
Transcribed Image Text:public class ReportSum { public static void main(String args[]) { //assume we have 2 numbers a and b, a = 2, b = 5 int a = 2; int b = 5; System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b)); 8 9 //assume we have 2 numbers a and b, a = 4, b = 4 a = 4; b = 4; System.out.println( "Provided Integers: 10 11 13 + a + and + b + ", the total is " + (a+b)); 15 //assume we have 2 numbers a and b, a = 1000, b = 2000 a = 1000; b = 2000; System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b)); 22 23 24 //assume we have 2 numbers a and b, a = 100, b = 101 a = 100; b = 101; System.out.println( "Provided Integers: " + a + " and " + b + ", the total is " + (a+b)); } 25
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT