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

Question #12

Engineering
1 answer:
NARA [144]3 years ago
8 0

Answer: It looks relevant and if you got all this info by yourself, wow, I'm impressed, GOOD JOB!

Explanation:

You might be interested in
C++ - Green Crud Fibonacci programThe following program is to be written with a loop. You are to write this program three times
Fynjy0 [20]

Answer:

Below is the required code:

Explanation:

Using for loop

#include <iostream>

using namespace std;

int main()

{

    //Initial crud size

    int init = 0;

    int newCrud;

    int next=0;

    //Number of days to simulate

    int no_days;

    int day;

    cout << "Enter initial amount of green crud: ";

    cin >> newCrud;

    cout << "Enter number of days to simulate: ";

    cin >> no_days;

    for (day = 10; day<=no_days; day++)

    {

         if (day % 10 == 0)

         {

             next = newCrud + init;

         }

             newCrud = init;

             init = next;

    }

    if (no_days < 5)

    cout << "\nCrud reproduce only after 5 days minimum.Hence the current amount is "

    << newCrud << " pounds.";

    else

    cout << "On day " << no_days << " you have " << init

    << " pounds of green crud." << endl;

    cout << "\nWould you like to continue? (y or n): ";

    cin >> ans;

         return 0;

}

Output:

         Enter initial amount of green crud: 5

         Enter number of days to simulate: 220

    On day 220 you have 10485760 pounds of green crud.

Using while loop

Program:

#include <iostream>

using namespace std;

int main()

{

    char ans='y';

    while (ans == 'Y' || ans == 'y')

    {

         //Initial crud size

         int init = 0;

         int newCrud;

         int next=0;

         //Number of days to simulate

         int no_days;

         int day;

         cout << "Enter initial amount of green crud:

         ";

         cin >> newCrud;

         cout << "Enter number of days to simulate:

         ";

         cin >> no_days;

         for (day = 10; day<=no_days; day++)

         {

             if (day % 10 == 0)

             {

                  next = newCrud + init;

             }

                  newCrud = init;

                  init = next;

         }

         if (no_days < 5)

         cout << "\nCrud reproduce only after 5 days

         minimum.Hence the current amount is "

         << newCrud << " pounds.";

         else

         cout << "On day " << no_days << " you have "

         << init

         << " pounds of green crud." << endl;

         cout << "\nWould you like to continue? (y or

         n): ";

         cin >> ans;

    }

    return 0;

}

Output:

Enter initial amount of green crud: 5

Enter number of days to simulate: 220

On day 220 you have 10485760 pounds of green crud.

Would you like to continue? (y or n): y

Enter initial amount of green crud: 5

Enter number of days to simulate: 225

On day 225 you have 10485760 pounds of green crud.

Using do while loop

Program:

#include <iostream>

using namespace std;

int main()

{

    char ans;

    do

    {

         //Initial crud size

         int init = 0;

         int newCrud;

         int next=0;

         //Number of days to simulate

         int no_days;

         int day;

         cout << "Enter initial amount of green crud: ";

         cin >> newCrud;

         cout << "Enter number of days to simulate: ";

         cin >> no_days;

         for (day = 10; day<=no_days; day++)

         {

             if (day % 10 == 0)

             {

                  next = newCrud + init;

             }

                  newCrud = init;

                  init = next;

         }

         if (no_days < 5)

         cout << "\nCrud reproduce only after 5 days

         minimum.Hence the current amount is "

         << newCrud << " pounds.";

         else

         

         cout << "On day " << no_days << " you have " <<

         init << " pounds of green crud." << endl;

         cout << "\nWould you like to continue? (y or n):

         ";

         cin >> ans;

    } while (ans == 'Y' || ans == 'y');

    return 0;

}

Output:

Enter initial amount of green crud: 5

Enter number of days to simulate: 220

On day 220 you have 10485760 pounds of green crud.

Would you like to continue? (y or n): y

Enter initial amount of green crud: 5

Enter number of days to simulate: 225

On day 225 you have 10485760 pounds of green crud.

7 0
3 years ago
Anyone want to play among us with me the code is MMJSUF
Katarina [22]

Answer:

sure

Explanation:

6 0
3 years ago
Read 2 more answers
3. (a) (5 points) Suppose N packets arrive simultaneously to a link at which no packets are currently being transmitted or queue
Bezzdna [24]

Answer:

(N-1) × (L/2R) = (N-1)/2

Explanation:

let L is length of packet

R is rate

N is number of packets

then

first packet arrived with 0 delay

Second packet arrived at = L/R

Third packet arrived at = 2L/R

Nth packet arrived at = (n-1)L/R

Total queuing delay = L/R + 2L/R + ... + (n - 1)L/R = L(n - 1)/2R

Now

L / R = (1000) / (10^6 ) s = 1 ms

L/2R = 0.5 ms

average queuing delay for N packets = (N-1) * (L/2R) = (N-1)/2

the average queuing delay of a packet = 0 ( put N=1)

4 0
4 years ago
A rigid tank contains 3 kg of water initially at 43.97% quality and at a temperature of 120°C. The water is heated until it reac
makkiz [27]

Explanation: see attachment below

6 0
3 years ago
What is a height gage?
Elena L [17]
The answer would be -62 because 62 x 1 equals 62 so that would be the answer.
6 0
3 years ago
Other questions:
  • Let suppose, you are going to develop a web-application for school management system. Then what architectural pattern will you u
    9·1 answer
  • Why is a building considered a type of system?
    6·1 answer
  • The water in an 8-m-diameter, 3-m-high above-ground swimming pool is to be emptied by unplugging a 3-cm-diameter, 25-m-long hori
    9·1 answer
  • What is a coarse-grained rock composed of intermediate plagioclase feldspar and pyroxene? a. graniteb. gabbro c. andesited. peri
    9·1 answer
  • Can someone Please help me..? If I'm your Onii-San then answer. And get brainliest. Make sure to explain why..
    15·1 answer
  • A car accelerates uniformly from rest to 60 km/h in 30 s. What is its displacement during this time?
    7·1 answer
  • When the rod is circular, radial lines remain straight and sections perpendicular to the axis do not warp. In this case, the str
    11·1 answer
  • using the following data for july, calculate the cost of goods manufactured: beginning finished goods inventory 150,475. Ending
    5·1 answer
  • Write the 5 important of profession education in a point​
    10·1 answer
  • (a) A non-cold-worked 1040 steel cylindrical rod has an initial length of 100 mm and initial diameter of 7.50 mm. is to be defor
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!