Question

Question 30 10 pts (SHORT ANSWER) Write three separate if blocks to check the following THREE conditions (number your answers
This is used as C++
How do I even figure this out at all? Please help me solve this tough question
0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE IN C++:

#include<bits/stdc++.h>

using namespace std;

int main(){
int testScore,bonusPoints;
char letterGrade;
cout << "Enter Test Score :\n";
cin >> testScore;
if(testScore >= 100 || testScore <= 0)
cout << "INVALID: OUTSIDE RANGE 0-100\n";
cout << "Enter bonus points :\n";
cin >> bonusPoints;
if(bonusPoints >= 1 && bonusPoints <= 10)
cout << "VALID: INSIDE RANGE 1-10\n";
cout << "Enter Letter Grade :\n";
cin >> letterGrade;
if(letterGrade == 'a' || letterGrade == 'A')
cout << "CONGRATULATIONS YOU MADE AN 'A' GRADE\n";
return 0;
}

Add a comment
Know the answer?
Add Answer to:
This is used as C++ How do I even figure this out at all? Please help...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This problem is considered from C++, I need to know the steps using the step-by-step function...

    This problem is considered from C++, I need to know the steps using the step-by-step function for me to fully understand on how to solve this tough problem. Question 30 10 pts (SHORT ANSWER) Write three separate if blocks to check the following THREE conditions (number your answers): 1. If the number variable testScore is outside the range of O through 100 (excluding both those scores), print the message: "INVALID: OUTSIDE RANGE 0-100" 2. If the number variable bonusPoints is...

  • This exercise is also from C++ How do I even figure this out? please help me...

    This exercise is also from C++ How do I even figure this out? please help me solve so I can get the answer correctly! Question 28 10 pts (SHORT ANSWER) Define a function named findEvenOrOdd that has 1 int parameter: num. When the function is called, it should use an if/else statement -OR- conditional expression to determine whether the variable num is an even or odd number and display appropriate message as follows: • If the value in num is...

  • I've been trying to do this and cant figure it out. Please help me with this...

    I've been trying to do this and cant figure it out. Please help me with this whole code, especially the section that is highlighted. Thank you!! Write a complete Java program to do the following: The main program reads in and prints three bowling scores, scorel, Score2, and score3. then calls a series of methods to process these scores. It The main program calls a method validGroup() to determine if this set of three values forms a valid group. The...

  • This is in python. I need to print out a specific message depending on the number...

    This is in python. I need to print out a specific message depending on the number that's input. for example, if the user inputs 1, program should print out "hello". if the user inputs 2, program should print out "hi". But also the program should keep asking for a number to be input after a valid number is input. For example, user inputs 1, program prints out "hello" and then asks the user to input another value. but also the...

  • please help ASAP need to complete soon needs to be done in C programing void countDays...

    please help ASAP need to complete soon needs to be done in C programing void countDays (unsigned month, unsigned day): Given a month and day, print a message based on the following conditions (which we would suggest testing in order). Don't get overwhelmed by the number of conditions--the function gets a bit long, but the function body shouldn't be that complex: • If the month is invalid, print Invalid month: followed by the month argument (for example, Invalid month 13)...

  • I need help with the following assignment: Write an application named DailyTemps that continuously prompts a...

    I need help with the following assignment: Write an application named DailyTemps that continuously prompts a user for a series of daily high temperatures until the user enters a sentinel value of 999. Valid temperatures range from -20 through 130 Fahrenheit. When the user enters a valid temperature, add it to a total; when the user enters an invalid temperature, display the error message: Valid temperatures range from -20 to 130. Please reenter temperature. Before the program ends, display the...

  • Python Programming: Why do I get UnboundLocalError? What does this mean and how can I fix...

    Python Programming: Why do I get UnboundLocalError? What does this mean and how can I fix it? Question: Write a function check_move(column, row) which returns a string describing a chess move to a given row and column on the chess board. Your program must check if the row and column entered are both valid. The column in a chess board is a letter ranging from A to H or a to h (inclusive) and the row is a number between...

  • python Canvas 10 pts Question 26 Assume a variable score that has already been initialized, write...

    python Canvas 10 pts Question 26 Assume a variable score that has already been initialized, write one if/elif/else statement that will: • Output the message "Test was not taken if the score variable is equal to 0. • Output the error message "Error: Score is not valid" if the value stored in the score variable is outside the range of 0-100 (i.e., not in between 0 and 100; less than 0 or greater than 100). . If the value stored...

  • This lab is to give you more experience with CH Making Decisions and Looping Please do...

    This lab is to give you more experience with CH Making Decisions and Looping Please do the following Review Questions 1. Using the following chart, write an if else if statement that assigns. 10..15 or 20 to commission, depending on the value in sales. Make sure sales is valid (ie. >= 0) Sales Commission Rate Up to $10.000 10% $10,000 to $15,000 15% Over $15,000 20% 2. Convert the following if else if statement into a switch statement. double number...

  • Chapter 08 Python Assignment: Question 1-5 Please I need help in my python course. Question 1...

    Chapter 08 Python Assignment: Question 1-5 Please I need help in my python course. Question 1 The finally clause of a try statement a. can be used to recover from an exception b. is required c. can be used to display more information about an exception d. is executed whether or not an exception has been thrown 10 points Question 2 Which of the following is the correct way to code a try statement that catches any type of exception...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT