answersLogoWhite

0

How do you write java code to sum -2 4-6 8?

User Avatar

Anonymous

∙ 13y ago
Updated: 8/20/2019

In Java, just write a plus sign between the numbers you want to add, or variables that hold those numbers. For example:

result = -2 + 4 + -6 + 8;

or:

a = -2;

b = 4;

c = -6;

d = 8;

result = a + b + c + d;

Don't forget to declare the variables.

User Avatar

Wiki User

∙ 13y ago
Copy

What else can I help you with?

Related Questions

What is the sum of 54 and 46?

the sum of 54 and 46 is equal to 100 54 + 46 = 100


What is the sum of 28 and 46?

It is: 28+46 = 74


23 plus 46?

The sum of 23 and 46 is 69


Sum of 46 and 8?

54.


What is the country code for Sweden when calling from Australia?

The country code for Sweden is +46, no matter where you're calling from.


What is the nearest tens of 46?

50 is 46 to the nearest 10


Find the product when the sum of 59 and 46 is multiplied. By their difference?

To find the product when the sum of 59 and 46 is multiplied by their difference, we first calculate the sum: 59 + 46 = 105. Next, we find the difference: 59 - 46 = 13. Finally, we multiply the sum by the difference: 105 * 13 = 1365. Therefore, the product is 1365.


What is the sum of 36.4 and 9.76?

46 ahaha


What is the sum of 1 plus 45?

46 is.


Which country has the international code plus 46?

Country code +46 is Sweden.


What is the code for TnT in Minecraft?

The ID (code) for TNT in Minecraft is 46.


When was Code 46 released?

Code 46 was released on 08/06/2004.

Trending Questions
What are China's favorite food? Where can you find keyboard notes for levan polka? Where are L G televisions made? What is the cube root of 528? What is the difference between the brother 651 and661 sewing machine? How has technology allowed us to control the flow of blood in humans? James II believed in a strong monarchy with absolute power that could not be limited by the people What did this lead to? What were the oscar winning movies of 1994? What do you do to hypnotize people? What does a green and red banded buoy mark? During the Adams administration? How do you remove a carrier bearing from a 1988 Suburban? A regular polygon has 12 sides What is the measure of each exterior angle? How many apples to make 3 pounds? Who was the wife of Arthur Granjean the accountant treasurer who submitted the patent for inventor's André Cassagnes drawing toy known as Etch A Sketch? When the air cool water vapor condenses on object what forms on grass? What did the government of the colonies have in common with that of Great Britain? Who said All shall be revealed in the fullness of time? What are death valleys landmarks and buildings? What is a dissertation in a PhD program and how does it contribute to the completion of the degree?

Resources

Leaderboard All Tags Unanswered

Top Categories

Algebra Chemistry Biology World History English Language Arts Psychology Computer Science Economics

Product

Community Guidelines Honor Code Flashcard Maker Study Guides Math Solver FAQ

Company

About Us Contact Us Terms of Service Privacy Policy Disclaimer Cookie Policy IP Issues
Answers Logo
Copyright ©2025 Answers.com. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Answers.