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
Fiesta28 [93]
2 years ago
15

Can you structure this code in if-statements?

Computers and Technology
1 answer:
Naddika [18.5K]2 years ago
3 0
Not sure what quizScore1-5 is, but here it is. Also, I'm not entirely sure what language you're working with here, but null can't be returned as an integer. If it were a string, for example, it'd be possible as string is an object reference type.

public int getData(int dataNumber)
{
    if (dataNumber == 1)
        return quizScore1;
    else if (dataNumber == 2)
        return quizScore2;
    else if (dataNumber == 3)
        return quizScore3;
    else if (dataNumber == 4)
        return quizScore4;
    else if (dataNumber == 5)
        return quizScore5;
    else
        return 0;
}
You might be interested in
What is 16/17 simplified?
77julia77 [94]
16/17 can't be simplified but if you want it as a decimal it's 0.9412 or 0.94
7 0
3 years ago
Read 2 more answers
7.12 LAB: Even/odd values in a list
Korvikt [17]

The odd values in a list can be calculated by knowing the first and last number, whereas even numbers can be divided by two and the remainder is zero (0).

<h3>What are even numbers and odd numbers?</h3>

The even numbers can be found in a list because they are divisible by two and the remainder of this equation is always zero (0).

Conversely, odd numbers are those that cannot be divided exactly into exact entire numbers (e.g., 3, 5, etc).

The odd numbers in a list can be calculated by the equation ON (odd numbers): n/2 × [f + g], where 'f' is the first number and 'g' is the last number.

In conclusion, the odd values in a list can be calculated by knowing the first and last number, whereas even numbers can be divided by two and the remainder is 0.

Learn more about odd numbers here:

brainly.com/question/2263958

#SPJ1

4 0
2 years ago
Explain how the number of jobs available to workers has been affected by the use of ICT in commerce and industry, using specific
blondinia [14]

Answer:

The main cause of lack of jobs is due to automation and the ability for computers to do everything faster, more efficiently and effectively.

Explanation:

A specific example - Data entry jobs are redundant from automation programs

- Economic Forum predicted a net increase of 58 million jobs for automation, so this accounts for losses but isn't case specific to data entry

6 0
2 years ago
When’s The release date for Mobile legends project next phase 3 going To come
Gennadij [26K]

Answer: This Project will involve Hero Revamps, Hero Adjustments, Hero Remodels, and much more. Project NEXT is divided into 2 phases: the first phase was released on September 22, 2020, the second phase was released on June 15, 2021 and the third phase is to be released on "September 2021".

4 0
2 years ago
How can you modify elements of the Start menu?
netineya [11]

Answer: you can add program by using a "pin" option or

For frequently used program you can customize the list by including or exuding program

But those on right are coming with Windows features

4 0
3 years ago
Other questions:
  • Ziffcorp, an it firm, uses a technology that automatically updates the antivirus software in all the computers in the firm whene
    13·1 answer
  • What was the impact of the rise of the Japanese auto industry and the semiconductor industry in south eastern​ Asia? A. It incre
    13·1 answer
  • Write a program that uses these bounds and bisection search (for more info check out the Wikipedia page on bisection search) to
    8·1 answer
  • Fill in the blanks. The ________________ donut chart shows the distribution across your website’s pages by the number of clicks
    14·1 answer
  • Lazarus Consulting is a large computer consulting company in New York. Pete Lazarus, theà CEOà and founder, is well known for hi
    8·1 answer
  • There is an interface I that has abstract class AC as its subclass. Class C inherits AC. We know that C delegates to an object o
    12·1 answer
  • Write a program that accepts two numbers R and H, from Command Argument List (feed to the main method). R is the radius of the w
    11·1 answer
  • Match each career to its various job roles. digital media coordinator digital media specialist photographer sound producer creat
    13·1 answer
  • Any one know??please let me know
    15·2 answers
  • 45 points!!
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!