Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If integer yearInput is in the inclusive range: 3 0 1 - 4 0 0 , output The 4 th century. 4 0 1 -

If integer yearInput is in the inclusive range:
301-400, output "The 4th century".
401-500, output "The 5th century".
501-600, output "The 6th century".
Otherwise, output "Records not available for this input". End each output with a newline. import java.util.Scanner;
public class CenturiesCategories {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int yearInput;
yearInput = scnr.nextInt();
/* Your code goes here */
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Write a Python program to check an input number is prime or not.

Answered: 1 week ago