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
AleksAgata [21]
3 years ago
12

Write a program to input 6 numbers. After each number is input, print the biggest of the numbers entered so far.

Engineering
1 answer:
likoan [24]3 years ago
4 0

Answer:

P<u>rogram:</u>

# Enter Numbers #

number1 = int(input("Enter number: " ))

print("Largest: " + string(number1))

#for num 2 #

number2 = int(input("Enter a number: "))

if number2 > number1:

 print("Largest: " + string(number2))

else:

 print("Largest: " + string(num1))

#for num 3 #

number3 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3)))  

#for num 4 #

number4 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4)))

#for num 5 #

number5 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5)))

#for num 6 #

number6 = int(input("Enter a number: "))

print("Largest: " + string(max(number1, number2, number3, number4, number5, number6)))        

# END #

You might be interested in
Solid Isomorphous alloys strength
Sphinxa [80]

Answer:

Explanation:

ℎ

3 0
3 years ago
Modify the Rainfall Statistics program you wrote for Programming Challenge 2 of Chapter 7 . The program should display a list of
rjkz [21]

Answer:

#include<iostream>

#include <iomanip>

using namespace std;

const int NUM_MONTHS = 12;

double getTotal(double [], int);

double getAverage(double [], int);

double getLargest(double [], int, int &);

double getSmallest(double [], int, int &);

double getTotal(int rainFall,double NUM_MONTHS[])

{

double total = 0;

for (int count = 0; count < NUM_MONTH; count++)

total += NUM_MONTH[count];

return total;

}

double getAverage(int rainFall,double NUM_MONTH[])

{getTotal(rainFall,NUM_MONTH)

average= total/NUM_MONTHS;

return average;

}

double getHighest(int rainFall, double NUM_MONTHS[]) //I left out the subScript peice as I was not sure how to procede with that;

{

double largest;

largest = NUM_MONTHS[0];

for ( int month = 1; month <= NUM_MONTHS; month++ ){

                     if ( values[month] > largest ){

                 largest = values[month];

return largest;

          }

double getSmallest(int rainFall, double NUM_MONTHS[])

{

double smallest;

smallest = NUM_MONTHS[0];

for ( int month = 1; month <= NUM_MONTHS; month){

                     if ( values[month] < smallest ){

                 smallest = values[month];

return smallest;

          }

 

int main()

{

double rainFall[NUM_MONTHS];

 for (int month = 0; month < NUM_MONTHS; month++)

  {

     cout << "Enter the rainfall (in inches) for month #";

     cout << (month + 1) << ": ";

     cin >> rainFall[month];

 

     while (rainFall[month] < 0)

     {

      cout << "Rainfall must be 0 or more.\n"

             << "Please re-enter: ";

      cin >> rainFall[month];

     }

  }

  cout << fixed << showpoint << setprecision(2) << endl;

  cout << "The total rainfall for the year is ";

  cout << getTotal(rainFall, NUM_MONTHS)

      << " inches." << endl;

   cout << "The average rainfall for the year is ";

  cout << getAverage(rainFall, NUM_MONTHS)

      << " inches." << endl;

   int subScript;

cout << "The largest amount of rainfall was ";

  cout << getLargest(rainFall, NUM_MONTHS, subScript)

      << " inches in month ";

  cout << (subScript + 1) << "." << endl;

  cout << "The smallest amount of rainfall was ";

  cout << getSmallest(rainFall, NUM_MONTHS, subScript)

      << " inches in month ";

  cout << (subScript + 1) << "." << endl << endl;

  return 0;

}

8 0
4 years ago
Anne works with other engineers studying physical processes that involve the flow of particles. Which field of engineering would
slega [8]

Answer:

Option A

Chemical engineering

Explanation:

Chemical engineering mainly encompass the study of behavior of different particles such as petroleum, water, drugs and other products. When Anne is involved in a study with engineers who study flow of particles, the flow, viscosity and other properties are among the behavior that chemical engineers are involved in.

3 0
4 years ago
Gtjffs
grandymaker [24]

the required documents is 3000

4 0
3 years ago
How many electrons move past a fixed reference point every t = 2.55 ps if the current is i = 7.3 μA ? Express your answer as an
iris [78.8K]

Answer:

116.3 electrons

Explanation:

Data provided in the question:

Time, t = 2.55 ps = 2.55 × 10⁻¹² s

Current, i = 7.3 μA = 7.3 × 10⁻⁶ A

Now,

we know,

Charge, Q = it

thus,

Q = (7.3 × 10⁻⁶) × (2.55 × 10⁻¹²)

or

Q = 18.615 × 10⁻¹⁸ C

Also,

We know

Charge of 1 electron, q = 1.6 × 10⁻¹⁹ C

Therefore,

Number of electrons past a fixed point = Q ÷ q

= [ 18.615 × 10⁻¹⁸ ] ÷ [ 1.6 × 10⁻¹⁹ ]

= 116.3 electrons

4 0
3 years ago
Other questions:
  • Consider a circular grill whose diameter is 0.3 m. The bottom of the grill is covered with hot coal bricks at 961 K, while the w
    10·1 answer
  • Rolling and Shearing are the types of a)-Bulk Deformation Process b)- Sheet Metal Process c)- Machining Process d)- Both a &amp;
    7·1 answer
  • Calculate the diffusion current density for the following carrier distributions. For electrons, use Dn = 35 cm2/s and for holes,
    6·1 answer
  • WHAT IS THE EFFECT OF ICE ACCRETION ON THE LONGITUDINAL STABILITY OF AN AIRCRAFT?
    8·1 answer
  • Engineers need to be open-ended when dealing with their designs. Why?
    11·1 answer
  • Can U lose a rank in Brainly by using too many points?
    6·1 answer
  • Steven is starting a project that requires a specialized, experienced contractor. Which selection process is the most suitable f
    11·1 answer
  • Use superpositions find​
    8·1 answer
  • Wells drilled by a nonprofit called Water for South Sudan use a pump that can provide up to 5,500 gallons of water per day. Use
    10·1 answer
  • Architecture reflects multidisciplinary
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!