# Project #22816 - 7 questions

Question 1

Write a program that reads an integer and prints out “Is Divisible By 7” or “Isn't Divisible by 7”,

depending on whether the integer is divisible by 7 or not.

Your program must use an if-then-else statement.

Quastion 2

Write a program that works the same as in Question 1, but uses a switch statement instead of an if-then-else statments

Question 3

Consider the following code for computing the letter grade from a numeric score (assume score is a double and has been initialized, and grade is a String).

if (score >= 60.0)

else if (score >= 70.0)

else if (score >= 80.0)

else if (score >= 90.0)

else

Explain what is wrong with this code?

Question 4

Write a program that uses a switch statement to compute the name of a day from a number between 1 and 7 representing the day.

Question 5

Write a program that reads an integer N, computes the product of the integers 1..N, and then prints out the result.

Question 6

Consider the following code:

int count = 0;

while(count < 100)

{

// Point A

System.out.println("Java");

count++;

// Point B

}

// Point C

Is count < 100 always true, always false, or sometimes true or sometimes false at Points A, B and C in

the code?

Question 7

Write a program reads in numbers (doubles) until a zero is input and computes the maximum and

minimum of all the read numbers (excluding the terminating zero).

i want the easiest way, this is intro to java class

 Subject Computer Due By (Pacific Time) 02/14/2014 12:00 am
TutorRating
pallavi

Chat Now!

out of 1971 reviews
amosmm

Chat Now!

out of 766 reviews
PhyzKyd

Chat Now!

out of 1164 reviews
rajdeep77

Chat Now!

out of 721 reviews
sctys

Chat Now!

out of 1600 reviews

Chat Now!

out of 770 reviews
topnotcher

Chat Now!

out of 766 reviews
XXXIAO

Chat Now!

out of 680 reviews