Tasks 5.00 out of 10.00 (0) Correctly displays score and offset from average Checks Input Test Case Incomplete Outputs how far score is from average case 1 74 65 34 1 out of 2 checks passed. Review the results below for more details. 25 100 86 47 54 Output Enter test scores: Test #0: 74 From Average: 14 Test #1: 65 From Average: 5 Test #2: 34 From Average: -26 Test # 3: 25 From Average: -35 Test #4: 100 From Average: 40 Test #5: 86 From Average: 26 Test #6: 47 From Average: -13 Test #7: 54 From Average: -6 Results Test #0: 74 From average: 13.375 Test # 1: 65 From average: 4.375 Test # 2: 34 From average: -26.625 Test # 3: 25 From average: -35.625 Test # 4: 100 From average: 39.375 Test # 6: 47 From average: -13.625 Test # 5: 86 From average: 25.375 Test # 7: 54 From average: -6.625 TestScoreList.cs 1 using System; 2 using static System.Console; 3 class Test ScoreList 4 5 { 6 static void Main() 7 { 8 int i, sum = 0, avg = 0; // variable declaration 9 int[] test new int [8]; // array declaration 10 11 Console.WriteLine("Enter test scores: "); 12 for (i = 0; i < 8; i++) // Loop to accept scores 13 { 14 test[i] = int.Parse(Console.ReadLine()); // accept scores 15} 16 17 for (i = 0; i < 8; i++) 18 { 19 sum + test[i]; // calculate sum 20} 21 22 avg = sum / 8; // calculate Average 23 24 for (i = 0; i < 8; i++) 25 { 26 Console.WriteLine("Test #"+i+": "+test[i]+" From Average: "+(test[i]-avg)); // p 27} 28 29 } 30 } 31
Tasks 5.00 out of 10.00 (0) Correctly displays score and offset from average Checks Input Test Case Incomplete Outputs how far score is from average case 1 74 65 34 1 out of 2 checks passed. Review the results below for more details. 25 100 86 47 54 Output Enter test scores: Test #0: 74 From Average: 14 Test #1: 65 From Average: 5 Test #2: 34 From Average: -26 Test # 3: 25 From Average: -35 Test #4: 100 From Average: 40 Test #5: 86 From Average: 26 Test #6: 47 From Average: -13 Test #7: 54 From Average: -6 Results Test #0: 74 From average: 13.375 Test # 1: 65 From average: 4.375 Test # 2: 34 From average: -26.625 Test # 3: 25 From average: -35.625 Test # 4: 100 From average: 39.375 Test # 6: 47 From average: -13.625 Test # 5: 86 From average: 25.375 Test # 7: 54 From average: -6.625 TestScoreList.cs 1 using System; 2 using static System.Console; 3 class Test ScoreList 4 5 { 6 static void Main() 7 { 8 int i, sum = 0, avg = 0; // variable declaration 9 int[] test new int [8]; // array declaration 10 11 Console.WriteLine("Enter test scores: "); 12 for (i = 0; i < 8; i++) // Loop to accept scores 13 { 14 test[i] = int.Parse(Console.ReadLine()); // accept scores 15} 16 17 for (i = 0; i < 8; i++) 18 { 19 sum + test[i]; // calculate sum 20} 21 22 avg = sum / 8; // calculate Average 23 24 for (i = 0; i < 8; i++) 25 { 26 Console.WriteLine("Test #"+i+": "+test[i]+" From Average: "+(test[i]-avg)); // p 27} 28 29 } 30 } 31
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
I am getting the wrong output below
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education