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
Rainbow [258]
2 years ago
11

Algorithm for sum 2+4+6+….+n

Engineering
1 answer:
gavmur [86]2 years ago
3 0
20 this is the sum hope this help
You might be interested in
8.19 - Airline Reservations System (Project Name: Airline) - A small airline has just purchased a computer for its new automated
e-lub [12.9K]

Answer:

The App is written in C++ language using dev C++.

Explanation:

/******************************************************************************

You can run this program in any C++ compiler like dev C++ or any online C++ compiler

*******************************************************************************/

#include <iostream>

using namespace std;

class bookingSeat// class for airline reservation system

{

  private:

   

   

  bool reserveSeat[10];// 10 seats (1-5) for first class and 6-10 for economy class

  int firstClassCounter=0;//count first class seat

  int economyClassCounter=5;//count economy class seat

  char seatPlacement;/* switch between economy and first clas seat----- a variable for making decision based on user input*/

  public:  

  void setFirstClassSeat()//

  {

      if(firstClassCounter<5)// first class seat should be in range of 1 to 5

      {

          reserveSeat[firstClassCounter]=1; /*set first class seat..... change index value to 1 meaning that it now it is reserved*/

          cout<<"Your First Class seat is booked and your seat no is "<<firstClassCounter+1; //display seat number reserved

          firstClassCounter++; //increament counter

      }

      else//in case seats are ful

      {

          cout<<"\nSeats are full";

          if(economyClassCounter==10 && firstClassCounter==5)

          {

              cout<<"\n Next flight leaves in 3 hours.";

          }

          else

          {

              cout<<"\nIt’s acceptable to be placed to you in the first-class section  y/n ";//take input from user

              cin>>seatPlacement;//user input

              if(seatPlacement=='y')//if customer want to reserve seat in first class

              {

                  setEconomyClassSeat();// then reserve first class seat

              }

              else

              {

                  cout<<"\n Next flight leaves in 3 hours.";

               }

               

          }

      }

       

  }

  void setEconomyClassSeat()//set economy class seat

  {

    if(economyClassCounter<10)//seat ranges between 6 and 10

      {

          reserveSeat[economyClassCounter]=1;// reserve economy class seat

          cout<<"Your Economy class seat is booked and your seat no is "<<economyClassCounter+1;//display reservation message about seat

          economyClassCounter++;//increament counter

      }

      else// if economy class seats are fulled

      {

          cout<<"\nSeats are full";

          if(economyClassCounter==10 && firstClassCounter==5)//check if all seats are booked in both classes

          {

              cout<<"\n Next flight leaves in 3 hours.";

          }

          else

          {

              cout<<"\nIt’s acceptable to be placed to you in the first-class section  y/n ";//take input from user

              cin>>seatPlacement;//user input

              if(seatPlacement=='y')//if customer want to reserve seat in first class

              {

                  setFirstClassSeat();// then reserve first class seat

              }

              else

              {

                  cout<<"\n Next flight leaves in 3 hours.";

               }

               

          }

      }

  }

   

   

};

int main()

{   int checkseat=10;// check seat

   int classType;//class type economy or first class

   bookingSeat bookseat;//object declaration of class bookingSeat

   while(checkseat<=10)//run the application until seats are fulled in both classes

   {

       cout<<"\nEnter 1 for First Class and 2 for Economy Class ";

       cin>>classType;//what user entered

       switch (classType)//decide which seat class to be reserved  

       {

           case 1://if user enter 1 then reserve first class seat

           bookseat.setFirstClassSeat();

           break;

           case 2://if user enter 2 then reserve the economy class seat

           bookseat.setEconomyClassSeat();

           

       }

       

   }

   

   return 0;

}

8 0
3 years ago
What is the ratio between driver gear A with 60 teeth and driven gear B with 180 teeth?
Anna71 [15]
The ratio between a and b is 1/3
3 0
3 years ago
A missile flying at high speed has a stagnation pressure and temperature of 5 atm and 598.59 °R respectively. What is the densit
alexdok [17]

Answer:

5.31\frac{kg}{m^3}

Explanation:

Approximately, we can use the ideal gas law, below we see how we can deduce the density from general gas equation. To do this, remember that the number of moles n is equal to \frac{m}{M}, where m is the mass and M the molar mass of the gas, and the density is \frac{m}{V}.

For air M=28.66*10^{-3}\frac{kg}{mol} and \frac{5}{9}R=K

So, 598.59 R*\frac{5}{9}=332.55K

pV=nRT\\pV=\frac{m}{M}RT\\\frac{m}{V}=\frac{pM}{RT}\\\rho=\frac{pM}{RT}\\\rho=\frac{(5atm)28.66*10^{-3}\frac{kg}{mol}}{(8.20*10^{-5}\frac{m^3*atm}{K*mol})332.55K}=5.31\frac{kg}{m^3}

7 0
3 years ago
Select four geometric shapes that are commonly used by engineers in their designs.
stealth61 [152]

Answer:

Arc ,sphere ,line ,prism

Explanation:

  • Arc is used for semicircular or short term projects
  • Sphere is used for design of spherical surfaces or projects
  • Prism is used for creating buliding designs
  • Lines are especially used for creating roads, flyover design
3 0
2 years ago
Which is the best description of power? A. the amount of kinetic energy lost during motion
cestrela7 [59]

Answer:

D. a measure of how fast a machine performs work​

Explanation:

Power can be defined as the energy required to do work per unit time.

Mathematically, it is given by the formula;

Power = \frac {Energy}{time}

Hence, the best description of power is that, it is a measure of how fast a machine performs work.

This can be calculated by using the mathematical expression below;

Power = \frac {Work done}{Time}

But we know that, Workdone = force * distance

6 0
3 years ago
Other questions:
  • What is the magnitude of the maximum stress that exists at the tip of an internal crack having a radius of curvature of 2.5×10-4
    13·1 answer
  • How many grams of perchloric acid, HClO4, are contained in 37.6 g of 70.5 wt% aqueous perchloric acid? How many grams of water a
    10·1 answer
  • Which element of Miranda's character is best illustrated by this excerpt?
    15·1 answer
  • The primary transformer voltage is 2.8 kV and the secondary is 230 V. The transformer is connected to a variable load (0 to 300
    8·1 answer
  • Suppose you have a Y-connected balanced three-phase load which consumes 200 kW with pf of 0.707 lagging. The line-to-line voltag
    14·1 answer
  • If these components have weights WA = 50000 lb , WB=8000lb, and WC=6000lb, determine the normal reactions of the wheels D, E, an
    14·1 answer
  • Use the method of cylindrical shells to find the volume generated by rotating the region bounded by the given curves about the y
    7·1 answer
  • Give three examples of how engineering has made human life better in your opinion.
    13·1 answer
  • The resistance of a copper wire 200 m long is 21 Q. If its thickness (diameter) is 0.44 mm, its specific resistance is around___
    11·1 answer
  • If a material is found to be in the tertiary phase of creep, the following procedure should be implemented:
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!