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
mash [69]
3 years ago
15

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

e, 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.

Computers and Technology
2 answers:
kherson [118]3 years ago
7 0

Answer:

// here is code in c.

#include <stdio.h>

// main function

int main()

{

// variable to store year

int year;

printf("enter year:");

// read the year

scanf("%d",&year);

// if year>=2101

if(year>=2101)

{

printf("Distant future");

}

//if year in 2001-2100

else if(year>=2001&&year<=2100)

{

   printf("21st century");

}

//if year in 19011-2000

else if(year>=1901&&year<=2000)

{

  printf("20th century");

}

// if year<=1900

else if(year<=1900)

{

  printf("Long ago");  

}

return 0;

}

Explanation:

Read the year from user.After this, check if year is greater or equal to 2101 then print "Distant future".If year is in between 2001-2100 then print "21st century".If year is in between 1901-2000 then print "20th century".Else if year is less or equal to 1900 then print "Long ago".

Output:

enter year:2018                                                                                                            

21st century

scoundrel [369]3 years ago
6 0

Answer:

if ( givenYear >= 2101 ) {

        System.out.print("Distant future");

     }

     else if (givenYear >= 2001 ){

        System.out.print("21st century");

     }

     else if ( givenYear >= 1901 ) {

        System.out.print("20th century");

     }

     else {

        System.out.print("Long ago");

     }

Explanation:

You might be interested in
I can login to it says to me u cant login at that time
sesenic [268]

Answer:

hhlbkhhlbhk

Explanation:

5 0
3 years ago
Read 2 more answers
Pick the two statements about packets and routing on the Internet which are true. a. Packets travelling across the Internet take
Cloud [144]

Answer:

B. TCP ensures messages can be reliably transmitted across the Internet.

D. TCP must account for the fact that packets may not arrive at a destination computer in the intended order

Explanation:

TCP or transmission control protocol is a connection oriented protocol that divides a packet to segments, and reliably sends them to their destination.

TCP is a layer 4 (transport layer) protocol in the OSI network model. Its packets data unit, PDU, is called segment.

For TCP connection to be successful, a three way handshake must be established between the client and server.

When a connection is established, tcp sends the packets in sequenced segments to the destination through various routes, the source receives acknowledgement for segments received by the destination and the source resend segment that were lost. In the destination, the TCP arranges the segments to its proper sequence.

8 0
3 years ago
True or False: Wire service provide tabloid news reports to media outlets.
Setler79 [48]

Answer:

True

Explanation:

this is true and here is an explanation on how they operate.

New is readily available through various sources, newspapers, magazine, radio, tv,and the internet. Each of these sources in competition.

A given story most times had same content often times due to much dependence on wired services.

wire services would collect stories from reporters, edit them to standard format and then distribute to broadcast stations and print media.

3 0
3 years ago
What are some of the challenges that could arise from setting up a file management system on a computer
Katarina [22]
<span>You could download some software that could mess up your whole computer.</span>
3 0
3 years ago
Building relationships during your career exploration is called A. clustering. B. futurecasting. C. matchmaking, D. networking.
Vaselesa [24]
Building relationships during your career exploration is called Networking. 
<span>when you're in career exploration phase, building a relationships with various people may expose you to various kind of opportunities that could benefit your career paths. 

Hope it helped!! :)</span>
5 0
4 years ago
Read 2 more answers
Other questions:
  • 5) How have the wireless web and peer-to-peer networking helped small businesses compete with large corporations?
    15·2 answers
  • What component of a computer system holds the operating system when the computer is not running
    6·2 answers
  • What are some situations where you might find it useful to use the “!” symbol in a program?
    9·1 answer
  • What menu allows you to look up a command and learn how to use it?
    14·1 answer
  • True or false.local and cloud backup differs in where the backup is saved
    15·2 answers
  • What is the most secure method for controlling privileged access to a system available for use in a public area?a. Database view
    5·1 answer
  • Which of the following is considered a basic task in the context of computer operations? a. Connecting to the Internet b. Natura
    6·1 answer
  • In which drawer can you set certain lights to light up on your micro:bit?
    12·2 answers
  • Create a set of functions that compute the mean, median, and mode of a set of
    8·2 answers
  • Which programming paradigm focuses on abstraction to the level of math and the elimination of side-effects and state based progr
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!