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
Which of the following is an example of a data base?
mihalych1998 [28]

See how long I can hold the key down. I forgot there was a max :/

 

hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

7 0
3 years ago
Show the output waveform of an AND gate with the inputs A, B,
NeX [460]

Answer:

Please see the attached image

Explanation:

6 0
3 years ago
In this problem you will test and analyze the following sorting algorithms: Selection, Bubble, Insertion, Merge, and Quick. You
Tpy6a [65]

Answer:

1) Selection, bubble and insertion sort requires no moves in the sorted array because there will be n comparisons in the array and no swapping would take place after each comparison so zero moves.

2) Bubble and insertion sort result in 999 comparisons as we are required to iterate only one time over the array. this can be easily explained from the diagram as in bubble sort all the elements will be in their sorted position so each element will be encountered only once.

3) In selection sort, any element is compared with all the elements and accordingly smaller is paced first so in the reverse sorted array there will be at least n^2 comparisons so n^2 moves.

4) in merge sort an array is always divided into n nos of parts and then sorted so in worst case as well as best case the array will be divided so same numbers of moves.

5 0
3 years ago
Declare a class named Patient
ivanzaharov [21]

Answer:

class PatientData:

 def __init__(self, height_inches = 0, weight_pounds = 0):

     self.height_inches = 0

     self.weight_pounds = 0

 

lunaLovegood = PatientData()

print ('Patient data (before):', end=' ')

print (lunaLovegood.height_inches, 'in,', end=' ')

print (lunaLovegood.weight_pounds, 'lbs')

lunaLovegood.height_inches = 63

lunaLovegood.weight_pounds = 115

print ('Patient data (after):', end=' ')

print (lunaLovegood.height_inches, 'in,', end=' ')

print (lunaLovegood.weight_pounds, 'lbs')

Explanation:

Output is as below

Patient data (before): 0 in, 0 lbs

Patient data (after): 63 in, 115 lbs

3 0
3 years ago
Niklaus Wirth added modules to Pascal in creating ______.
Reil [10]

Answer: Mesa

Explanation:

The Niklaus Wirth made a portion of the given field that is essential language of the programming, which including the modula, oberon and pascal with an objective of improving the software engineering concepts.

The mesa is basically created by the Xerox PARC, and it is depended on Pascal. The essential new component of Modula is the module with the particular interfacing specification.

7 0
3 years ago
Other questions:
  • How many total channels are available in the United States for wireless LAN use in the unlicensed 2.4ghz ism band ?
    6·1 answer
  • Suppose you wanted to run a web server or ftp server from your home. what type of ip address would you want?​
    15·1 answer
  • What weight pencil is recommended for darkening lines and for lettering? *
    7·2 answers
  • What can search the Internet and select elements based on important words?
    6·2 answers
  • Almost all application programs are designed to run with a specific platform. Group of answer choices True False
    15·1 answer
  • Which method will return the first element in an ArrayList employees?
    5·1 answer
  • For example, consider a file with protection mode 644 (octal) contained in a directory with protection mode 730. How might the f
    9·1 answer
  • A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
    5·1 answer
  • An important goal of biosecurity training is to: Prevent laboratory accidents that could expose personnel to hazardous agents. P
    13·1 answer
  • I think i have a virus on my computer what am i supposed to do
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!