Question: Please help me. Thanks Ternary operator Write a program that loops indefinitely. In each iteration of the loop, read in an integer N (declared as
Ternary operator Write a program that loops indefinitely. In each iteration of the loop, read in an integer N (declared as an int) that is inputted by a user, output N/6 if N is nonnegative and divisible by 5, and -1 otherwise. Use the ternary operator (?:) to accomplish this. continue Modify the code from 3.4.1 so that if the condition fails, nothing is printed. Use an if and a continue command (instead of the ternary operator) to accomplish this. break Modify the code from 3.4.2 to let the user break out of the loop by entering -1 or any negative number. Before the program exits, output the string "Goodbye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
