16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 46 41 42 43 44 45 O references static void Main() { // array declaration int[] testScore = new int [8]; //variable declaration float avg, sum = 0; // get user input Console.WriteLine("Enter the test score of eight student"); for (int i = 0; i < 8; i++) { } ¡ TestScoreList.Program { int j = 0; testScore[j] = Convert.ToInt32(Console.ReadLine()); sum sum + testScore[]; // cakculate average avg= sum / 8; // display the result for (int i = 0; i < 8; i++) { } int i = 0; Console.Write("Test #" +1+""+ testScore[i] + "From average: "+(double) (testScore[i]-avg) + "\n"); }
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 46 41 42 43 44 45 O references static void Main() { // array declaration int[] testScore = new int [8]; //variable declaration float avg, sum = 0; // get user input Console.WriteLine("Enter the test score of eight student"); for (int i = 0; i < 8; i++) { } ¡ TestScoreList.Program { int j = 0; testScore[j] = Convert.ToInt32(Console.ReadLine()); sum sum + testScore[]; // cakculate average avg= sum / 8; // display the result for (int i = 0; i < 8; i++) { } int i = 0; Console.Write("Test #" +1+""+ testScore[i] + "From average: "+(double) (testScore[i]-avg) + "\n"); }
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
C# Question. Where are the errors coming from in my code? I tried different ways but no luck. Help would be appreciated of input and output!
![C TestScoreList
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
33
34
67%
36
37
38
45
O references
static void Main()
{
tab
// array declaration
int[] testScore = new int [8];
//variable declaration
esc
float avg, sum = 0;
// get user input
Error List Output
Ready
caps lock
业不
Console.WriteLine("Enter the test score of eight student");
for (int i = 0; i < 8; i++)
{
63°F
Mostly cloudy
}
int j = 0;
testscore[j] = Convert.ToInt32(Console.ReadLine());
sum = sum += testScore[];
// cakculate average
avg = sum / 8;
// display the result
for (int i = 0; i < 8; i++)
{
Error List
Entire Solution
Code Description
CS0443 Syntax error, value expected
CS0136
2
}
int i = 0;
Console.Write("Test #" + 1 + ":" + testScore[1] + "From average: "+(double) (testScore[1]-avg) + "\n");
}
?
L
↑ ↓
xl 2 Errors
A
A local or parameter named 'i' cannot be declared in this scope because that nam IS
used in an enclosing local scope to define a local or parameter
f2
A 0 Warnings
2
f3
TestScoreList.Program
#
W
3
0 Messages
E
f4
LA
101
4
f5
%
R
Build+IntelliSense
D
S
LO
5
LL
f6
T
Project
TestScoreList.
TestScoreList
G
hip
17
&
7
Y
O
18
B
File
Program.cs
Pregram.cs
*
co
19 144
U
(
N
9
110
10
HJK
Ln: 32
Search Error List
37
Line Suppression
32
Active
DII
1
M
Ch: 36
Active
O
TA](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb9f0bdf4-572f-4133-8b3a-121eaba2f02a%2F5726d39a-5a94-4a4f-8afd-6296a8f49fb5%2F3vh0pk_processed.jpeg&w=3840&q=75)
Transcribed Image Text:C TestScoreList
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
33
34
67%
36
37
38
45
O references
static void Main()
{
tab
// array declaration
int[] testScore = new int [8];
//variable declaration
esc
float avg, sum = 0;
// get user input
Error List Output
Ready
caps lock
业不
Console.WriteLine("Enter the test score of eight student");
for (int i = 0; i < 8; i++)
{
63°F
Mostly cloudy
}
int j = 0;
testscore[j] = Convert.ToInt32(Console.ReadLine());
sum = sum += testScore[];
// cakculate average
avg = sum / 8;
// display the result
for (int i = 0; i < 8; i++)
{
Error List
Entire Solution
Code Description
CS0443 Syntax error, value expected
CS0136
2
}
int i = 0;
Console.Write("Test #" + 1 + ":" + testScore[1] + "From average: "+(double) (testScore[1]-avg) + "\n");
}
?
L
↑ ↓
xl 2 Errors
A
A local or parameter named 'i' cannot be declared in this scope because that nam IS
used in an enclosing local scope to define a local or parameter
f2
A 0 Warnings
2
f3
TestScoreList.Program
#
W
3
0 Messages
E
f4
LA
101
4
f5
%
R
Build+IntelliSense
D
S
LO
5
LL
f6
T
Project
TestScoreList.
TestScoreList
G
hip
17
&
7
Y
O
18
B
File
Program.cs
Pregram.cs
*
co
19 144
U
(
N
9
110
10
HJK
Ln: 32
Search Error List
37
Line Suppression
32
Active
DII
1
M
Ch: 36
Active
O
TA
![CHAPTER 6 Using Arrays
3.
2.
Write a program named TestScoreList that accepts eight int values representing
student test scores. Display each of the values along with a message that indicates how
far it is from the average.
Write a program named Temperatures Comparison that allows a user to input five
daily Fahrenheit temperatures that must range from -30 to 130; if a temperature
is out of range, require the user to reenter it. If no temperature is lower than
any
previous one, display a message Getting warmer. If every temperature is lower than
the previous one, display a message Getting cooler. If the temperatures are not entered
in either ascending or descending order, display a message It's a mixed bag. Finally,
of the temperatures.
display the temperatures in the order they were entered, and then display the average
971
Write a program named CheckZips that is used by a package delivery service to check
delivery areas. The program contains an array that holds the 10 zip codes of areas to
which the company makes deliveries. Prompt a user to enter a zip code, and display a
message indicating whether the zip code is in the company's delivery area.
Write a program called DeliveryCharges for the package delivery service in Exercise 4.
e program should again use an array that holds the 10 zip codes of areas to which
company makes deliveries. Create a parallel array containing 10 delivery charges
ompany does not deliver to the requested zip code.
differ for each zip code. Prompt a user to enter a zip code, and then display either
essage indicating the price of delivery to that zip code or a message indicating that
hat-A-While phone company provides service to six area codes and charges
-minute rates for phone calls shown in Figure 6-25. Write a program named
an area code and the length of time for a call in minutes, and then
While that stores the area codes and rates in parallel arrays and allows a user
of the call.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb9f0bdf4-572f-4133-8b3a-121eaba2f02a%2F5726d39a-5a94-4a4f-8afd-6296a8f49fb5%2Fasenoc6_processed.jpeg&w=3840&q=75)
Transcribed Image Text:CHAPTER 6 Using Arrays
3.
2.
Write a program named TestScoreList that accepts eight int values representing
student test scores. Display each of the values along with a message that indicates how
far it is from the average.
Write a program named Temperatures Comparison that allows a user to input five
daily Fahrenheit temperatures that must range from -30 to 130; if a temperature
is out of range, require the user to reenter it. If no temperature is lower than
any
previous one, display a message Getting warmer. If every temperature is lower than
the previous one, display a message Getting cooler. If the temperatures are not entered
in either ascending or descending order, display a message It's a mixed bag. Finally,
of the temperatures.
display the temperatures in the order they were entered, and then display the average
971
Write a program named CheckZips that is used by a package delivery service to check
delivery areas. The program contains an array that holds the 10 zip codes of areas to
which the company makes deliveries. Prompt a user to enter a zip code, and display a
message indicating whether the zip code is in the company's delivery area.
Write a program called DeliveryCharges for the package delivery service in Exercise 4.
e program should again use an array that holds the 10 zip codes of areas to which
company makes deliveries. Create a parallel array containing 10 delivery charges
ompany does not deliver to the requested zip code.
differ for each zip code. Prompt a user to enter a zip code, and then display either
essage indicating the price of delivery to that zip code or a message indicating that
hat-A-While phone company provides service to six area codes and charges
-minute rates for phone calls shown in Figure 6-25. Write a program named
an area code and the length of time for a call in minutes, and then
While that stores the area codes and rates in parallel arrays and allows a user
of the call.
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
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 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY