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
Describe all the main stress causal agents​
LekaFEV [45]

Answer:

Causes of Stress

Being unhappy in your job.

Having a heavy workload or too much responsibility.

Working long hours.

Having poor management, unclear expectations of your work, or no say in the decision-making process.

Working under dangerous conditions.

Being insecure about your chance for advancement or risk of termination.

5 0
3 years ago
What are three ways digital identity is created and kept up? (open answer)
Anna007 [38]

Answer:

Capture attributes as ID documents or biometric data

Explanation:

Examples of such attributes include biometrics, verified identification documents, and third-party verification procedures. To create a trusted digital ID, there are typically three steps: capturing verified attributes, verification of the documents, and digitization of the ID.

Great day :) toodles

6 0
2 years ago
Which one of the following media is unguided media ?​
krok68 [10]

Explanation:

1. radio transmission.

2. microwave transmission

3. infrared transmission.

4 0
2 years ago
Necesito ejemplos de actitud filosófica por favor
GrogVix [38]

Answer:

La filosofía es una disciplina intelectual que estudia críticamente las cuestiones más básicas de la humanidad y la naturaleza. Preguntas fundamentales de la filosofía son, entre otras, las siguientes:

-¿Existe alguna realidad fuera de mis pensamientos?

-¿Qué es el conocimiento?

-¿Qué es la verdad?

-¿Qué hace que una acción sea valiosa?

-¿Los humanos y los animales tienen valor y son iguales o diferentes?

-¿Qué es el tiempo?

Así, el planteamiento y reflexión de este tipo de preguntas son claros ejemplos de actitud filosfófica.

7 0
3 years ago
Counting the character occurrences in a file
Katena32 [7]

Answer:

hope this helps!

Explanation:

#include <iostream>

#include <fstream>

using namespace std;

void print_histogram(int counter[26])

{

   for(int i = 0; i < 26; ++i){

       cout << (char)(i+97) << " ";

       for(int j = 0; j < counter[i]; ++j){

           cout << (char)254;

       }

       cout << endl;

   }

}

int main()

{

   int counter[26] = {0};

   string filename = "data.txt";

   char byte = 0;

   // opens file in read mode

   ifstream input_file(filename);

   if (!input_file.is_open()) {

       cerr << "Could not open the file - '"

            << filename << "'" << endl;

       return EXIT_FAILURE; // exit if not opened

   }

   // reads every character from the file

   while(input_file.get(byte)){

       if(byte >= 97 && byte <= 122){

           ++counter[byte-97];

       }

   }

   print_histogram(counter); // required print histogram function

   return 0;

}

5 0
3 years ago
Other questions:
  • Which windows tool is used to determine if a dynamic disk is corrupted?
    6·1 answer
  • Hit and Slopes Program: A Write a program that can be used by a ski resort to keep track if local snow conditions for one week.
    15·1 answer
  • For a typically large organization how many dns servers should you install
    5·1 answer
  • An application is to be written that would allow students to find out their GPA(double) and their total number of credits (an in
    15·1 answer
  • Which of these jobs would be most appropriate for someone who majors in computer engineering? ANSWER FAST PLEASE
    15·2 answers
  • 7. When using find command in word we can search?
    7·1 answer
  • The _____ class can be used to get user input using dialog boxes.
    14·1 answer
  • The latest form of personal communication that most resembles a public journal is a _____.
    15·2 answers
  • Choose the best type of loop for each situation.
    6·1 answer
  • Software que busca, detecta y elimina malware tipo espía; puede instalarse en la computadora de manera aislada o en conjunto con
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!