C++ on zybooks. Write a complete C++ program to input 3 integer exam scores and
ID: 3745066 • Letter: C
Question
C++ on zybooks.
Write a complete C++ program to input 3 integer exam scores and then output the following three values (each on a line by itself): 1. exam average as a real number, 2 whether the student is passing or failing, assuming an average of 70.0 or better is considered passing, and 3 how the student is 'trending, where output+if the subsequent score is higher,-if the subsequent soore is identical, and if a subsequent score is lower Assume the inputs are valid exam scores in the range 0-100, inclusive. Here are some examples. Suppose the input is a0 01 84 The output would be the following Average: 81.6667 Status: passing Trend:++ The 'trend" is +because the first two scores are 80 and 81, yielding,and then the 2nd and 3rd scores are 81 and 84, yielding+ again. However, suppose the inputs are a0 a0 32 Then the output would be Average: 64 Status: failing Trend: - The 'trend"isbecause the first two scores are 80 and 80 (trending-, but then the 2nd and 3rd scores are 80 and 32 trending PROGRAMMING INSTRUCTIONS A C++ template is provided to help you get started. Zyante contains a complete C++ programming environment, so you are free to work here. Zyante provides 2 modes: Develop and "Submit". In Develop mode, you supply the input values in the text field provided, then click Run program to run your program and see the output This gives you a chance to develop and test your program as you see fit. When you are ready to submit your program for grading, switch to Submit mode, and click Submit for grading. This will run your program against the provided test cases (some of which may be hidden). The zyante system will submit a copy of your program, along with your score. In this assignment you may subrmit as many times as you want without penaltyzyante records your highest score. If you fail to pass a test, keep in mind that auto-grading systems demand 100% precision. For example, your answer will be marked as incorrect if you do not output the requested values in the desired format extra spaces or missing newlines will be marked as incorrect. Compare your output to the expected output to determine whats wrong Does zyante save your work? Zyante saves the most recent copy that you submittedi.e. the last time you clicked the Run program or Submit for grading button. If you close the browser and reload the web page, this is the version of the program you will see. There is no way to go back to earlier versions, or save your current work unless you Run/Submit. For this reason, it is recommended that you save your work in an editor or word processor. You are free to work outside of zyante in a programming environment of your choioe, but you must submit for grading using the zyante system copy paste your program into zyante, switch to Submit mode, and Submit for grading. Note that different programming environments have different defaults, so it's quite possible that a program working outside of zyante will fail when run inside zyante. This is not an error in the zyante systemthis means there is a logic error in your program. The most common mistake is failure to initialize a variable. If your program fails to produce output here in zyante, then switch to Develop mode, supply some test inputs, and Run program. Make sure your program compiles, and runs to completion. Add output statements if you need to debug furtherExplanation / Answer
#include using namespace std; char trend(int n1, int n2) { if(n1 == n2) { return '='; } else if(n1 > n2) { return '-'; } else { return '+'; } } int main() { int n1, n2, n3; cin >> n1 >> n2 >> n3; double avg = (n1+n2+n3) / 3.0; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.