1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
photoshop1234 [79]
2 years ago
5

Write a short java method that takes an integer n and returns the sum of all the odd positive integers less than or equal to n.

Computers and Technology
1 answer:
umka2103 [35]2 years ago
3 0
Public int add2n( int n )
{
    int total;
    if( n % 2 == 0 )
        total = n--;

    while( n > 0 )
    {
        total += n;
        n -= 2;
   }
   return( total );
}

You might be interested in
What Intel socket recommends the use of a liquid cooling system?
Marizza181 [45]
The Intel socket that Intel recommends you use a liquid-cooling system on is the LGA2011.
5 0
3 years ago
_____ is a personal application software that includes a wide range of built-in functions for statistical, financial, logical, d
VladimirAG [237]

Answer:

spreadsheet

Explanation:

<h2><u>Fill in the blanks</u></h2>

<u>spreadsheet</u>  is a personal application software that includes a wide range of built-in functions for statistical, financial, logical, database, graphics, and date and time calculations.

7 0
3 years ago
¿El auto es un servicio tecnológico? / The car is a technological service?
EleoNora [17]
A car isn’t technological, It runs on gas. Hopes this helps :p
4 0
3 years ago
Fill in the blank: In a Word chart, text that describes the data represented in a chart and that is typically displayed on the r
Triss [41]

Answer:

Data bar

Explanation:

8 0
3 years ago
Select the correct answer.
Marina86 [1]
C: pie chart is the answer to it
4 0
2 years ago
Read 2 more answers
Other questions:
  • What do the points on this website do?
    14·2 answers
  • What adds the element carbon to the environment
    10·2 answers
  • You need to deploy a new cloud-based windows intune deployment to manage mobile devices in your organization. drag and drop the
    5·1 answer
  • When you are almost done with your soup and want to get at the last little bit, how should you do this 2
    5·1 answer
  • All NATE specialties are offered at two levels, A. journeyman and master. B. installation and service. C. apprentice and journey
    7·1 answer
  • Apex
    5·2 answers
  • What spreadsheet tool could be used to add together the numbers in a<br> selected group of cells?
    10·1 answer
  • Select the correct answer from each drop-down menu.
    14·1 answer
  • Kaitlin likes a particular design theme, but she is not sure about every single color for bullets, backgrounds, etc. found in th
    7·1 answer
  • What is ‘situational awareness” in game design?please answer in a full sentence!
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!