Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I AM TRYING TO CALCULATE THE AVERAGE OF 3 TEST SCORES: 86, 75, 62, AND 98. THE AVERAGE HAS TO EQUAL 80.25. THE PROBLEM IS

I AM TRYING TO CALCULATE THE AVERAGE OF 3 TEST SCORES: 86, 75, 62, AND 98. THE AVERAGE HAS TO EQUAL 80.25. THE PROBLEM IS MY CODE IS ONLY PRODUCING 80. PLEASE HELP! USING ONLY C++ (hint: i was told to fix the problem i need to declare average as double and divide by 4.0 not 4).
image text in transcribed
cellaneous Files (Global Scope) //This program calculates the average of four test scores when the user enters the scores #include | using namespace std; Boa Nowa se int main() { double testi, test2, test3, test4, average; double average; cout > testi; cout> test2; cout> test3; cout >> test4; double average = (testi + test2 + test3 + test4) / 4.0; cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

Contrast exteroceptors and interoceptors?

Answered: 1 week ago

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago