Question: Programming C 5. Write a complete program to read two numbers. Using a switch statement, determine if the first number entered is in between 1
Programming C
5. Write a complete program to read two numbers. Using a switch statement, determine if the first number entered is in between 1 to 6, then prints on the screen "Jan to June " followed by the year from the second entered number. If the first number entered is in between 7 to 12, then prints on the screen "July to Dec followed by the year. Apply proper data validation in this program. 5 6. Write a program to read a number and print the pH value and example element based on the following pH scale: pH Category Environmental Effects Example Element Value 0 Battery acid 1 Sulfuric acid 2 Lemon juice, vinegar 3 Orange juice, soda 4 Acidic All fish die Acidic rain, acidic lake Frog eggs, tadpoles, Bananas, Clean rain crayfish and mayflies die 6 Rainbow trout begin to Healthy lake, milk die 7 Neutral Pure water 8 Sea water, eggs 9 Baking soda 10 Milk of Magnesia 11 Basic Ammonia 12 Soapy water 13 Bleach 14 Liquid drain cleaner Apply proper data validation in this program. 7. Modify the program written for Question (6) to print the category, and environmental effects on the screen too. Avoid from repeating the printing statement more than once
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
