subject
Computers and Technology, 22.02.2020 23:27 AdoNice

Write an if-else statement with multiple branches.
If year is 2101 or later, print "Distant future" (without quotes). Otherwise, if year is 2001 or greater, print "21st century". Otherwise, if year is 1901 or greater, print "20th century". Else (1900 or earlier), print "Long ago".

Sample output with input: 1776

What am I doing wrong here
I've tried it with =>
and just >

It isn't running the final submission

Testing with input: 1901
Output differs. See highlights below.
Your output
Long ago
Expected output
20th century


Write an if-else statement with multiple branches. If year is 2101 or later, print

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
Amitha writes up a one-page summary of a novel during her summer internship at a publishing company. when she reads over the page, she realizes she used the word “foreshadow” seven times, and she would like to reduce the repetition. which tool would best amitha solve this problem?
Answers: 3
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
Create a file called favorite_foods, and list your favorite foods, entering five or six or more. press enter after each favorite food so it appears on its own line (make certain you also press enter after the final food item). after the file is created, add two more foods you like that are not on the list (press enter after the final food item). view the list of foods to make certain the two items you added appear at the end of the list
Answers: 2
You know the right answer?
Write an if-else statement with multiple branches.
If year is 2101 or later, print "Distant fu...
Questions
question
Biology, 31.07.2020 18:01
question
Mathematics, 31.07.2020 18:01
question
Mathematics, 31.07.2020 18:01
question
Physics, 31.07.2020 18:01
question
Mathematics, 31.07.2020 18:01
Questions on the website: 13722361