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]
3 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]3 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
Malware is a combination of which two words? A. malevolent and software B. malignant and software C. maladapted and software D.
ladessa [460]

Answer:

D. Malicious and software

5 0
3 years ago
There is no need to schedule video calls ahead of time; they can be used the same way as
UNO [17]

Answer:

The answer to this question is "True".

Explanation:

The term video calling is part of communication. In this type of communication will be used in every place like house, office for video conferencing, etc. It was developed in 1968 by AT&T's Bell Labs. It works on internet.This type of calling we can face to face communicate means, we watch the person. In the video calling, there is no need for a schedule it is used as a phone call.  

6 0
3 years ago
Given the network 192.168.100.0/24, we are going to segment this network into two subnets, Subnet A and Subnet B. The hosts requ
Paraphin [41]

Answer and Explanation:

Each subnet can only be power of 2s.

Thus first subnest would have 2^7 = 128 IPs (100 were required)and second subnet would have 2^6 = 64 IPs (42 were required).

Subnet A with 100 Hosts required for 192.168.100.0/25 network:

Subnet mask -> 255:255:255:128

(Mask for 11111111:11111111:11111111:1000000)

Number of usable Host : 2^7 - 1 - 1 = 126

(Since we cannot use IP addresses ending in 0 and 127)

IP Network Address:

192.168.100.0/25

First Valid IP address:

192.168.100.1

Last Valid IP address:

192.168.100.126

Subnet Broadcast IP:

192.168.100.127

Subnet B with 42 Hosts required for 192.168.100.128/26 network:

Subnet mask -> 255:255:255:192

(Mask for 11111111:11111111:11111111:1100000)

Number of usable Host : 2^6 - 1 - 1 = 64-2 = 62

(Since we cannot use IP addresses ending in 0 and 63)

IP Network Address:

192.168.100.128/26

First Valid IP address:

192.168.100.129

Last Valid IP address:

192.168.100.190

Subnet Broadcast IP:

192.168.100.191

8 0
3 years ago
What game is a great example of a story unfolding as the levels increase where the player learns more about the plight of the pr
Phantasy [73]
Fortnite and mario kart are good examples
4 0
3 years ago
Read 2 more answers
What are some examples of objects by which you can browse in the select browse option
mezya [45]
Safe search ,tunnel search
7 0
3 years ago
Other questions:
  • In Python
    15·1 answer
  • The process in which access looks for records in a table based on the fields and criteria in the query design, finds those recor
    6·1 answer
  • Write a function that finds the number of occurrences of a specified character in the string using the following header: def cou
    9·1 answer
  • What is the top folder of the file tree called
    5·2 answers
  • When making an on-site service call, what should you do before making any changes to software or before taking the case cover of
    6·1 answer
  • A company has a number of employees. The attributes of EMPLOYEE include Employee ID (identifier), Name, Address, and Birthdate.
    11·1 answer
  • Name of the electrical tool and their classification
    10·1 answer
  • Write a qbasic program to display integer numbers 1 to 100 using the for next loop<br>​
    9·1 answer
  • State the domain and range for the following relation. Then determine whether the relation represents a function. A box labeled
    6·1 answer
  • Why do we need to use a VPN service?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!