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
What statement best describes operating systems?
True [87]

Answer:

An operating system, or "OS," is software that communicates with the hardware and allows other programs to run

3 0
3 years ago
Read 2 more answers
Please help me<br>... <br>.... ​
Lina20 [59]

Answer:

formal information searches

Explanation:

3 0
3 years ago
Read 2 more answers
HELP ME !!!!!!!
ra1l [238]

Answer:

C. Protocol Identifier

3 0
3 years ago
Malware or malicious software does not include which of the following? A. Spyware B. Trojan Horses C. Computer viruses D. New so
Fed [463]
I would say answer choice D
6 0
3 years ago
Read 2 more answers
The users in your organization bring their own mobile devices to the office and want to be able to access the network with them.
Afina-wow [57]

Answer:

The Windows feature that can be used to protect a network from malware threats that might be on the network user's mobile devices is;

Device Health Attestation (DHA)

Explanation:

Device Health Attestation (DHA) is a feature introduced in version 1507 of widows 10 that enables increased security of the network of enterprises to have mainly hardware which are attested and monitored using cloud based service health check or DHA service on Windows Server 2016.

Device Health Attestation carries out assessments on devices based on Windows 10 devices and Windows 10 mobile devices that work with TPM 1.2 or 2.0 and devices which are within the premises

Items checked include boot configuration and attributes such as Secure Boot, ELAM, and BitLocker

Corrective action are triggered by Mobile Device Management (MDM) based on report data from the DHA.

4 0
3 years ago
Other questions:
  • 1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
    12·1 answer
  • After earning a learners license what test must be successfully passed to earn an operators license in Florida
    14·1 answer
  • What are vertical sets of cells called
    5·2 answers
  • In 2007, __________ Floridians were injured in alcohol-related collisions.
    6·2 answers
  • What the address for dns server that the eorkstation will use?
    10·1 answer
  • How do u beat sonic unleashed
    8·1 answer
  • This activity involves the final processing and complete sterilization of the process finish product
    10·1 answer
  • Which of the following is a benifit of googling yourself ?
    9·1 answer
  • Refer to Table 8-4. Consider the data above (in billions of dollars) for an economy: Gross domestic product (in billions of doll
    12·1 answer
  • All information that is to be processed by a computer must first be entered into memory via an input device.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!