Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Feedback? CHALLENGE ACTIVITY 3 . 5 . 1 : Detecting ranges using logical operators. 5 2 8 0 4 0 . 3 4 8 9

Feedback?
CHALLENGE
ACTIVITY
3.5.1: Detecting ranges using logical operators.
528040.3489528.qx3zqy7
Modify the given if statement so that "Not a mid-size university" is output if students Input is outside the range 9500-19000 inclusive. Otherwise, "Mid-size university" is output.
Click here for examples
public class UniversityPopulation {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int studentsInput;
studentsInput = scnr.nextInt () ;
// Modify the following line
if ((studentsInput 9500) && (studentsInput >19000)){
System.out.println("Not a mid-size university");
}
else {
System.out.println("Mid-size university");
}
}
}
image text in transcribed

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

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

b. Where did they come from?

Answered: 1 week ago