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
Alona [7]
3 years ago
11

Write a program to find all integer solutions to the equation 4x + 3y -9z = 5 for values of x, y, and z between 0 to 100.

Computers and Technology
1 answer:
rjkz [21]3 years ago
8 0

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

  int c= 0;//defining integer variable to count number of solutions

  int x,y,z;//defining integer variable which is used in the loop

  for (x = 0; x <= 100; x++)//defining for loop to x value

     for (y = 0; y <= 100; y++)//defining for loop to y value

        for (z = 0; z <= 100; z++)//defining for loop to z value

           if (4 * x + 3 * y - 9 * z == 5)//use if to check given condition

           {

              c++;//increment count value

              cout << "(" << x << "," << y << "," << z << ")";//print solutions  

              cout << (c % 11? " " : "\n");//use for add file solution in a row

           }

  cout << "\n\nThere are " << c << " solution(s)\n";//print solution couts

  return 0;

}

Output:

Please find the attached file.

Explanation:

In the above-given code four integer variable "x,y,z, and c" is declared, in which "x,y, and z" is used in the for loop with the if conditional statement that checks the given condition and prints the solution and the "c" variable is used to counts the number of solution, and at the last, it uses the print method to print its values.  

You might be interested in
You are attending to a neighbor who is unresponsive, not breathing normally, and pulseless. Your spouse has left to activate EMS
Novosadov [1.4K]

Answer:

inspect the CPR mask and make sure that the one-way valve is correctly in place.

Explanation:

Based on the information provided within the question it seems that the next logical step would be to inspect the CPR mask and make sure that the one-way valve is correctly in place. This valve allows oxygen to be pushed into the victim's lungs but does not pull the oxygen back through the valves, that is part of the chest compression's that the person performing the CPR needs to do.

3 0
2 years ago
Who developed the Great Compromise ​
Nostrana [21]

Answer:

Roger Sherman

The solution came in the form of a compromise proposed by statesmen Roger Sherman and Oliver Ellsworth of Connecticut. The Great Compromise created two legislative bodies in Congress.

Explanation:

comment how it helps

7 0
3 years ago
Which type of mountain is formed due to the collision of two different kinds of plates?
Lyrx [107]
D) Andean mountains are formed due to the collision of two different kinds of plates.
6 0
3 years ago
Read 2 more answers
What type of coverage pays for damage incurred as a result of theft, vandalism, fire or natural disaster?
Sloan [31]

Comprehensive or hazard insurance

5 0
3 years ago
Suppose you define a java class as follows: public class test { } in order to compile this program, the source code should be st
likoan [24]
Test.java

The classname and the filename need to match (case sensitive).
5 0
3 years ago
Other questions:
  • The function takes two string parameters; the first is the name of a file and the second is text. Complete the function to appen
    7·1 answer
  • Implement the function pairSum that takes as parameters a list of distinct integers and a target value n and prints the indices
    11·1 answer
  • . Two or more functions may have the same name, as long as their _________ are different.
    9·1 answer
  • Many programmers today use a(n) _________, which is software that helps them build their computer programs. eula cad sdlc ide
    15·1 answer
  • Web crawlers or spiders collect information from Web pages in an automated or semi-automated way. Only the text of Web pages is
    10·1 answer
  • How do you write the slope-intercept form?
    5·1 answer
  • Please help me on this please i am giving all of my points so please help me
    6·1 answer
  • What is the school wifi password trying to do my class work in school on different devices.
    9·1 answer
  • Explain how communication facilitate cordination​
    14·1 answer
  • What is the value of six sigma ? How dose it relate to agile management
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!