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
padilas [110]
3 years ago
10

What is the output of the following program fragment. Choose appropriate data-types of variables to match output.

Engineering
1 answer:
Alexxx [7]3 years ago
3 0

Answer:

1

Explanation:

Given :

i=7;j=8;k=9;

printf(“%d”,(i+10)%k/j);

The printf function only displays the result

%d - is used for the display format

However, the actual calculation is in the expression: (i+10)%k/j

Given the variables :

i = 7 ;

j = 8 ;

k = 9 ;

(i + 10) = (7 + 10) = 17

(i + 10) % k = 17 % 9

% = remainder value after division

17 % 9 = (17 / 9) = 1 remainder 8

17 % 9 = 8

Hence,

(i + 10) % k = 8

(i + 10) % k / j

j = 8

8 / 8

= 1

You might be interested in
Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If user
Thepotemich [5.8K]

Answer:

import java.util.Scanner;

public class FindMatchValue {

  public static void main (String [] args) {

     Scanner scnr = new Scanner(System.in);

     final int NUM_VALS = 4;

     int[] userValues = new int[NUM_VALS];

     int i;

     int matchValue;

     int numMatches = -99; // Assign numMatches with 0 before your for loop

     matchValue = scnr.nextInt();

     for (i = 0; i < userValues.length; ++i) {

        userValues[i] = scnr.nextInt();

     }

     /* Your solution goes here */

         numMatches = 0;

     for (i = 0; i < userValues.length; ++i) {

        if(userValues[i] == matchValue) {

                       numMatches++;

                }

     }

     System.out.println("matchValue: " + matchValue + ", numMatches: " + numMatches);

  }

}

8 0
3 years ago
Just some random stufff
NeTakaya

Answer:

Nice!

Explanation:

5 0
3 years ago
Ammonia vapor becomes irritating to the<br> nose and throat at a concentration of<br> ___ppm
mr_godi [17]

Answer: Even low airborne concentrations (100 ppm) of ammonia may produce rapid eye and nose irritation.

8 0
3 years ago
Natural Gas Corporation obtains a federal license to operate a gas pipeline through a certain area of Oregon. The Oregon state l
pentagon [3]

Answer:

b. the supremacy clause

Explanation:

This is clearly a violation of the supremacy clause of the constitution. The supremacy clause makes the constitution and federal laws made under the constitutional authority the supreme law of the united state. And in a case where there is a conflicting state law, as we have here with Oregon, the federal law is supposed to take priority.

So in this case where the federal law and the state law do not agree, the feral law has the power to override the law of the state. So oregon has violated the supremacy clause

6 0
3 years ago
Heather is troubleshooting a computer at her worksite. She has interviewed the computer’s user and is currently trying to reprod
Luba_88 [7]

Answer:

The correct option is A

Explanation:

Heather is trying to establish a theory of probable cause. In this step of the troubleshooting process, the person troubleshooting questions the obvious and then test the theory or response given by the user to really determine the cause. Once confirmation of this theory has been achieved, the troubleshooter then tries to establish a resolution to the problem. However in the event whereby the theory is not confirmed, the troubleshooter then tries to establish a new theory.

8 0
4 years ago
Other questions:
  • An air conditioner removes heat steadily from a house at a rate of 750 kJ/min while drawing electric power at a rate of 6 kW. De
    5·1 answer
  • What are the two most important things to remember when at the end of your interview?
    6·1 answer
  • What is measurement in term of electrical engineering ​
    5·1 answer
  • What are the 2 reasons an alignment should be done?
    13·1 answer
  • Water at 70 kPa and 1008C is compressed isentropically in a closed system to 4 MPa. Determine the final temperature of the water
    6·1 answer
  • A 35kg block of mass is subjected to forces F1=100N and F2=75N at agive angle thetha= 20° and 35° respectively.find the distance
    11·1 answer
  • Lagest organs of the human body
    6·2 answers
  • A manufacturer has been asked to produce 100 customized metal discs with a particular pattern engraved on them. Which production
    10·2 answers
  • The majority of adults now own smartphones or tablets, and most of them say they use them in part to get the news. From 2004 to
    7·1 answer
  • Conduct online research and write a short report on the origin and evolution of the meter as a measurement standard. Discuss how
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!