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));

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education