Question
Problem #1 Multiples of 2, 3, 5 and 7: Write a main program that asks the user for an integer value and prints out if
Problem #1 Multiples of 2, 3, 5 and 7: Write a main program that asks the user for an integer value and prints out if that value is a multiple of 2, 3, 5, and 7. It will print out all that the number is a multiple of. For example, if the user typed in 30, it will state that the number is a multiple of 2, 3 and 5. If the value is 35, it will print out that 35 is a multiple of 5 and 7. Below are examples of the expected output with user inputs of 4, 14, 30 and 210
BProblem #2 Calculating letter grades: Write a main program that determines the letter grade of a given score received from the user. The score can be a real number so make sure you use the correct data type. Use the "Multiple Choice else if" technique discussed on page 254 to solve this problem using the if-else statement. This technique will be talked about during the next class session but you can read the section and look at the example program (electric.c) in the text book if you want to get started on it before then. The class weight for the grades are on the right. Unlike the multiple values that are printed in Problem #1, for any score given by the user, only one letter grade will be printed. Therefore, if the user provides a values of 74.45, only the grade C will be printed and not D. )
Write three C programs that solve the problem listed below Write a main program that asks the user for an integer value and prints out if that value is a multiple of 2, 3, 5, and 7, It will print out all that the number is a multiple of. For example, if the user typed in 30, it will state that the number is a multiple of 2, 3 and 5. If the value is 35, it will print out that 35 is a multiple of 5 and 7. Below are example of the expected output with user inputs of 4, 14, 30 and 210. You can solve this by using multiple individual it statements. Test and verify your solutions with several different integer values. Write a main program that determines the letter grade of a given score received from the user. The score can be a real number so make sure you use correct data type. Use the Multiple Choice else if" technique discussed on page 254 to solve this problem using the if-else statement. This technique will be talked about during the next class session but you can read the section and look at the example program [electric.c] n the text book if you want to get started on it before then. The class weight for the grades are on the right. Unlike the multiple values that are printed in Problem #1, for any score given by the user, only one letter grade will be printed. Therefore, if the user provides a values of 74-45, only the grade C will be printed and not D. Example execution with typed user input of 78.36
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started