menu
bartleby
search
close search
Hit Return to see all results

It's Java so here's the questionWrite the code to calculate the total of three int variables a, b, and c and print the result int a = 3;int b = 5;int c = 8;And thank you ?

Question

It's Java so here's the question

Write the code to calculate the total of three int variables a, b, and c and print the result 

int a = 3;

int b = 5;

int c = 8;

And thank you ?

 

check_circleAnswer
Step 1

To write a program in java, to calculate the sum of given three integer variables and printing their result.

Step 2

Program code:

public class Main

{

//Main method declaration

public static void main(String[] args)

{

int a = 3;

int b = 5;

int c = 8;

int sum;

//calculating sum of the three given variables

sum = a+b+c;

// displaying the tota...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Our solutions are written by experts, many with advanced degrees, and available 24/7

See Solution
Tagged in

Engineering

Computer Engineering

Related Computer Engineering Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: The 66 low-orbit satellites in the Iridium project are divided into six necklaces around the earth. ...

A: Answer:Satellites per necklace = 66/6                                     = 11

question_answer

Q: Consider the UDP header 12 03 00 OF 00 1E A3 10. What is the total length of the UDP? a) 32 bytes b)...

A: Consider the given:The given User Datagram Protocol header is “12 03 00 0F 00 1E A3 10”.

question_answer

Q: Write a program called StudentTable that prints the below table. Use only print() orprintf(). DO NOT...

A: The program in Java would be using print and printf statements with formatting for left alignment of...

question_answer

Q: Write a program in Eclipse called LoopMethod (main method) that contains a method called printNums (...

A:  Algorithm: Step 1: Import required package.Step 2: Define “LoopMethod” class.Step 3: Define main fu...

question_answer

Q: Assume that a firm has already implemented a KMS system, as a manager, how do you ensure that learni...

A: Protecting knowledge of the organization is a typically an IP protection problem. From the case stud...

question_answer

Q: What is system change-over

A: System changeover is a process of changing the way a thing is done to another and how other activiti...

question_answer

Q: Assume the following declarations and initializations (MIN, MAX, num) are made just before each sub-...

A: 1. Program plan:Define the class.Define the “main()” function.Initialize the necessary variables.The...

question_answer

Q: Write a class, AgeMessages , which does the following:a. Ask the user to enter age using a Scannerb....

A: The algorithm for the program would be as below:Declare one float variable for accepting user inputP...

question_answer

Q: Provide a functional block diagram for a concept for an autonomous transportation and/or delivery th...

A: Autonomous transportation is the evolution of transport where the vehicles are connected to create a...

Sorry about that. What wasn’t helpful?