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
LenaWriter [7]
3 years ago
5

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

e, if givenYear is 2000 or greater (2000-2099), print "21st century". Else, if givenYear is 1900 or greater (1900-1999), print "20th century". Else (1899 or earlier), print "Long ago". Do NOT end with newline. For Java
Computers and Technology
1 answer:
Elanso [62]3 years ago
5 0

Answer:

The program to this question in java can be given as

import java.util.Scanner;

//import package for take input from user.

public class Main //define class

{

public static void main(String[] args) // main function

{

Scanner input = new Scanner(System.in);

System.out.println("Enter a number:");

int givenYear=input.nextInt();

//if condition true output is "Distant future" (without quotes).

if (givenYear >= 2100)

{

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

}

// else if condition(2000-2099) true output is "21st century".

else if((givenYear >= 2000) && (givenYear <= 2099))

{

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

}

//else if condition (1900-1999) true output is "20th century".

else if((givenYear >= 1900) && (givenYear <= 1999)){

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

}

//else condition false output is "Long ago".

else{

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

}

}

}

Explanation:

In this program we use the scanner class. Scanner class is used to take input from the user.When the user input the input the year. It hold on a variable(givenYear) that is integer type.Then we check the value between the ranges that is given in question.To check all the condition we use the if-elseif-else statement, and AND(&&) operator.AND operator is a logical operator that is used for compare two values together. The output of the program can be given as:

Output:

Enter a number: 2016

21st century

You might be interested in
What is the benefit of making an archive folder visible in the Outlook folder list?
Rufina [12.5K]

Answer:

a

Explanation:

5 0
2 years ago
whenever I try to make an account it says it can't sign me up at this time or something- can you help?-
Rus_ich [418]

Answer:

You can try emailing tech support and describing your issue. In order to get the best help as quickly as possible, try providing screenshots of what happens when you sign in or describe everything you see on the screen when the problem occurs, and quote error messages directly when possible.

5 0
3 years ago
Which of the following systems is designed with full-time monitoring tools that search for patterns in network traffic to identi
kvasek [131]

Answer:

B. Intrusion Detection Software (IDS)

Explanation:

An Intrusion Detection Software (IDS) is designed to monitor all inbound and outbound network activity and identify any suspicious patterns that may indicate a network or system attack from someone attempting to break into or compromise a system. IDS is considered to be a passive-monitoring system, since the main function of an IDS  product is to warn you of suspicious activity taking place − not prevent them. An IDS essentially reviews your network traffic and data and will identify probes, attacks, exploits and other vulnerabilities. IDSs can respond to the suspicious event in one of several ways, which includes displaying an alert, logging the event or even paging an administrator. In some cases the IDS may be prompted to reconfigure the network to reduce the effects of the suspicious intrusion.

3 0
3 years ago
What is the faster way for browsers to obtain the revocation status of a digital certificate attached to a Web site?
Lyrx [107]

Answer:

The fastest way to obtain the revocation status of digital certificate of the website is by using Online certificate Status Protocol (OSCP).

Explanation:

Online certificate status protocol is the protocol that help user to check and verify the digital certificate revocation status. This protocol is linked with the digital certificate issuance authority. Whenever someone want to verify the status of the digital certificate that is attached to access the website. The website administrator can send the request to OSCP handler to ensure the status of the certificate. The OSCP handler is connected through certificate issuance authority, send the detail to verify the status. After verifying the status, OSCP handler respond as certificate is valid or revoked to the concerned user.

5 0
3 years ago
TCO 10) Voice packets could experience a significant _____ delay in routers and switches when sharing a network with data traffi
bonufazy [111]

This delay in routers is what we called Packetization delay or also called Accumulation delay. Packetization delay is the time required for the information to pass on the wires. The data rate of the links that passes thru the wires cause the delay.

8 0
3 years ago
Other questions:
  • In a transaction-processing system (TPS), if the TPS database can be queried and updated while the transaction is taking place,
    12·1 answer
  • What port in your computer will you use to plug in your camera?
    14·2 answers
  • What command is used to generate an RSA key pair?
    9·1 answer
  • Frank develops a questionnaire for his study on Internet dating. One of his questions asks, "How do you feel about Internet dati
    14·2 answers
  • Whats the wire that connects to the wifi box
    15·2 answers
  • Lisa is modifying a spreadsheet. Which view will allow Lisa to see how her changes will look when she prints the spreadsheet?
    13·2 answers
  • Do you agree that technology can be used to commit acts of violence ? Explain why or why not
    11·1 answer
  • Write a function findWithinThreshold that identifies the elements of a given array that are inside a threshold value. Takes the
    13·1 answer
  • Jeroo Bob has just awoken from a long night's sleep and is hungry for some winsum flowers. He walks out of
    7·1 answer
  • The _________________ can be used to repair common causes of unbootable operating systems. It is based on the Windows Preinstall
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!