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
beks73 [17]
3 years ago
10

Write an if-else statement with multiple branches. If givenYear is 2101 or greater, print "Distant future (without quotes). Else

, if givenYear is 2001 or greater (2001-2100), print "21st century". Else, if givenYear is 1901 or greater (1901-2000), print 20th century". Else (1900 or earlier), print Long ago'. Do NOT end with newline. 1 #include 3 int main(void) {4 int givenYear; 6 givenYea r = 1776; 8 Your solution goes here return 0;}
Engineering
1 answer:
vladimir1956 [14]3 years ago
5 0

Answer:

//Program was implemented using C++ Programming Language

// Comments are used for explanatory purpose

#include<iostream>

using namespace std;

int main()

{

int givenYear; // Declare givenYear as integer

cout<<"Enter a Given Year: "; // Prompt telling the user to enter any year

cin>>givenYear; // This line accepts input for variable givenYear

// Check if givenYear is greater than or equal to 2101

if(givenYear >= 2101)

{

cout<<"Distant Future";

}

// Check if givenYear is greater than or equal to 2001 but less than 2101

else if(givenYear >= 2001)

{

cout<<"21st Century";

}

// Check if givenYear is greater than or equal to 1901 but less than 2001

else if(givenYear >= 1901)

{

cout<<"20th Century";

}

// Check if givenYear is less than 1901

else

{

cout<<"Long ago";

}

return 0;

}

Explanation:

You might be interested in
Which of the given strategies is specifically a competitive advantage sustainment strategy?
Igoryamba

The strategy that is specifically a competitive advantage-sustaining strategy is differentiation. The correct option is B.

<h3>What is a sustainment strategy?</h3>

This success is provided through a sustainment approach, which encourages salespeople to extend their efforts. There are four business level-strategies.

Each team member builds a repeatable performance that results in incremental gains as they learn to maintain their abilities. An organizational advantage is creating a work environment around this idea.

Therefore, the correct option is B. differentiation.

To learn more about sustainment strategy, refer to the below link:

brainly.com/question/11887945

#SPJ1

6 0
2 years ago
A segment of a roadway has a free flow speed of 45 mph and a jam density of 25 ft per vehicle. Determine the maximum flow and at
-BARSIC- [3]

Answer:

2376 vph

Explanation:

Given data

free flow speed ( Vf ) = 45 mph

Jam density = 25 ft per vehicle

flow rate = 1950 vph

first we calculate the Jam density in vehicle /mile

= 5280 / 25 = 211.2 vehicle/mile

where ; 1 mile = 5280 feet

The maximum flow can be calculated using Greenshield method

q = ( Vf * jam density ) / 4  =  ( 45 * 211.2 ) / 4

  = 2376 vph

4 0
3 years ago
How does an airfoil create lift?
scoundrel [369]

Answer:

An airfoil creates lift by exerting a downward force on the air as it flows past

3 0
3 years ago
Ok this really isn’t a question but I need help, I’m wondering if a Samsung galaxy 9 is a good phone
Savatey [412]

Answer:

yes it is

Explanation:

it's an extremely good phone in my opinion

7 0
3 years ago
Read 2 more answers
The water behind Hoover Dam in Nevada is 221 m higher than the Colorado River below it. At what rate must water pass through the
dexar [7]

Answer:

23.06262m^3/s

Explanation:

The volume flow rate of the water is determined from the needed power output and the elevation difference:

Where, height (h) =221m, power(w)=50MW=50*10^6w

Density of water (ρ)=1000kg/m^3

Efficiency of turbine(η)=100%=1

V=W/ρηgh

=50*10^6m^3/(1)*(1000)*(9.81)*(221)s=23.06262m^3/s

3 0
3 years ago
Other questions:
  • 1. A vertical curve joins a -1.2% grade to a +0.8% grade. The two grades intersect at station 75 + 00 and elevation 50.90 m abov
    8·1 answer
  • Martensitic transformations only occur in the Fe-C system. ___ Certain materials can age harden at room temperature. ___ Pure me
    7·1 answer
  • Rubber bands provided the thrust to get your rocket going. Why did the rocket keep moving after it left the launch pad and the r
    5·1 answer
  • The maximum compressive load experienced by the same truss member would occur when the live load is __________. The magnitude of
    9·1 answer
  • A 11.5 nC charge is at x = 0cm and a -1.2 nC charge is at x = 3 cm ..At what position or positions on the x-axis is the electric
    5·1 answer
  • The gross weight of a two-place Piper Cherokee is 2000lb and its wing area is 160 ft^2. What is its wing loading
    14·1 answer
  • Technician A says that a graphing multi-meter may be used to verify signals going to and from electrical and electronic componen
    9·1 answer
  • Which of the following explains the difference between conservation and preservation?
    5·1 answer
  • ⊂who else is obsessed with the ornail
    9·1 answer
  • A countinous shot that sense, flows well, and is understanable and pleasant to look at
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!