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
Alex787 [66]
3 years ago
10

Consider the following two code segments. In both, assume that n is an integer variable that has been declared and initialized.

Segment 1 int prod = 1; int i; for (i = 2; i <= n; i++) { prod *= i; } System.out.println(prod); Segment 2 int prod = 1; int i = 2; while (i <= n) { prod *= i; i++; } System.out.println(prod); For which integer values of n do these code segments print the same result?
Computers and Technology
1 answer:
Ksivusya [100]3 years ago
6 0

Answer:

For every value of n.

Explanation:

In code segment 1 it uses for loop to store the product of integers from 2 to n in variable product it does that by using a for loop after that printing the product.

In the other code segment the same thing is done the only difference is that it uses a while loop instead of for loop to find the product and then printing the product.

So the result will be same for every value of n.

You might be interested in
Which type of server runs Active Directory?
omeli [17]

Answer:C

Explanation:it authorizes and authenticates all users and computer in a window domain- type network assigning and enforcing security for all computers and installing or updating software

6 0
3 years ago
Interactivity and Blank______ are two important capabilities of the Internet in the Blank______ relationship.
ANTONII [103]

Interactivity and individuality are two important capabilities of the Internet in the buyer-seller relationship.

<h3>What is  individuality?</h3>

The Definition of the term individuality connote the full character that is specific to and set apart a person from another.

Note that Interactivity and individuality are two important capabilities of the Internet in the buyer-seller relationship.

Learn more about individuality from

brainly.com/question/18405002

#SPJ1

4 0
2 years ago
What are the ten application areas of computer?​
Hoochie [10]

Answer:

Banking and Financial company: Computers are used in bank for electronic money transfer, voucher, ledger, bank sheet, etc. ...

Education: ...

Industries: ...

Entertainments: ...

Hospital: ...

Data processing: ...

Science and Engineering: ...

Offices:

Explanation:

8 0
3 years ago
Complex scientific research is usually done using?
garik1379 [7]

Complex scientific research is usually done using A Mainframe Computer.

<h3>What is a Mainframes computer?</h3>

Mainframes are a type of computer that generally are comprehended for their large size, amount of storage, processing power and high level of reliability. They are primarily used by large organizations for mission-critical applications requiring high volumes of data processing. In general, there are a few characteristics of mainframes that are common among all mainframe vendors:

Nearly all mainframes have the ability to run (or host) multiple operating systems. Mainframes can add or hot swap system capacity without disruption. Mainframes are designed to handle very high volume input and output (I/O) and emphasize throughput computing. A single mainframe can replace dozens or even hundreds of smaller servers.

Thus, Mainframe Computer is the answer.

To learn more about   Mainframe Computer click here:

brainly.com/question/14480599

#SPJ1

4 0
2 years ago
What features are provided by most GUIs?
PSYCHO15rus [73]

Windows is the answer

8 0
4 years ago
Other questions:
  • Will upvote!
    12·1 answer
  • Jemima is reviewing her history report and notices that her headings are not formatted the same throughout the report. She wants
    5·2 answers
  • What is the standard markup language of the world wide web?
    14·1 answer
  • Explain URL's parts with the help of an example.​
    10·1 answer
  • Which of the following statements is true?
    8·2 answers
  • when you enter a formula in a cell the result of the calculation displays in a cell. how do views of formula after entering it?
    9·2 answers
  • Write an application program in C++ to implement a class Fibonacci to print Fibonacci series upto N using member function series
    9·1 answer
  • Design and implement an application that reads a set of values in the range 1 to 100 from the user and then creates a chart show
    8·1 answer
  • Evaluation of your strengths and weaknesses
    13·1 answer
  • 1.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!