Question: C++ PART 2 (Lab Assignment) a Write a program that reads in one integer number and prints out if the number is divisible by 5.

C++ C++ PART 2 (Lab Assignment) a Write a program that reads in

PART 2 (Lab Assignment) a Write a program that reads in one integer number and prints out if the number is divisible by 5. (Hint: Use the modulus operator %). b. The wavelength of visible light ranges from 380 to 750 nanometers (nm). While the spectrum is continuous, it is often divided into 6 colors as shown below: Color Violet Blue Green Yellow Orange Red Wavelength (nm) 380 to less than 450 450 to less than 495 495 to less than 570 570 to less than 590 590 to less than 620 620 to 750 Write a program that reads a wavelength from the user and reports its color. Display an appropriate error message if the wavelength entered by the user is outside of the visible spectrum c. Write a program that reads a three-digit number and calculate the sum first and the last digit in the number. The program should then print whether the sum is even or odd. (Hint: use the remainder and the division operations to separate numbers). Example: for the number 358, the sum of the first and last digit is 3+8=11 and the sum is odd. 159

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!