I still can't figure out why I'm not getting both scores to show in output. Images for help of both input and output would be much appreciated!
I still can't figure out why I'm not getting both scores to show in output. Images for help of both input and output would be much appreciated!
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
I still can't figure out why I'm not getting both scores to show in output. Images for help of both input and output would be much appreciated!

Transcribed Image Text:price =
c. if(itemNumber ==
price
d. two of these
1.
Zone
integer itemNumber is not 100?
20. Which of the following C# expressions results in TAX being added to price if the
a. if(itemNumber != 100)
price
price + TAX;
b. if(! (itemNumber == 100))
price = price + TAX;
d. all of these
Exercises
price + TAX;
price + TAX;
== 5 && (zone ==1 || 3))
1 || zone == 3))
c. if(itemNumber <100 || itemNumber > 100)
price = price + TAX;
Programming Exercises
Write a program named CheckCredit that prompts users to enter a purchase price
for an item. If the value entered is greater than a credit limit of $8,000, display an error
message; otherwise, display Approved.
2. Write a program named Twitter that accepts a user's message and determines
whether it is short enough for a social networking service that does not accept
messages of more than 140 characters.
187
3. Write a program named Admission for a college's admissions office. The user enters
a numeric high school grade point average (for example, 3.2) and an admission
test score. Display the message Accept if the student meets either of the following
requirements:
• A grade point average of 3.0 or higher, and an admission test score of at least 60
• A grade point average of less than 3.0, and an admission test score of at least 80
• If the student does not meet either of the qualification criteria, display Reject.
![Toolbox
File Edit
4
What's New?
#Admission
100%
9
10
11 |
12
EU
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Error List
View
27
28
29
30
78°F
Sunny
Git Project Build Debug Test Analyze Tools Extensions Window
2.C.
Program.cs* X Form1.cs [Design]
O references
internal static class Program
{
O references
static void Main()
{
X6 A1
Debug
Any CPU
else
Console.Write("Enter grade point average: ");
double gradePointAvg = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter admission test score: ");
double admTestScore = Convert.ToDouble(Console.ReadLine());
if (gradePointAvg >= 3.0 && admTest Score >= 60)
'Console.WriteLine("Accept");
else if (gradePointAvg
Console.WriteLine("Accept");,
↑↓
X 6 Errors
Admission.Program
Console.WriteLine("Reject");
Entire Solution
Code
Description
A CS0642 Possible mistaken empty statement
CS1525 Invalid expression term 'else'
CS1525 Invalid expression term 'else'
C# Interactive (.NET Framework 64-bit) Error List Output
Ready
A 1 Warning
Start
<= 3.0 && admTestScore >= 80) i
0 0 Messages
Y Build + IntelliSense
G
Help Search (Ctrl+Q)
2 A
40
Project
Admission
Admission
Admission
File
Main()
Program.cs
Program.cs
Program.cs
1
O
P
Ln: 34 Ch: 10
Admission
Active
Active
Active
SPC
Search Error List
Line Suppression State
24
25
25
CRLF
Ix
↑ Add to Source Contr](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb9f0bdf4-572f-4133-8b3a-121eaba2f02a%2Fad1a1286-3049-4dac-800e-df046b8fa799%2Fve4zkj2_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Toolbox
File Edit
4
What's New?
#Admission
100%
9
10
11 |
12
EU
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Error List
View
27
28
29
30
78°F
Sunny
Git Project Build Debug Test Analyze Tools Extensions Window
2.C.
Program.cs* X Form1.cs [Design]
O references
internal static class Program
{
O references
static void Main()
{
X6 A1
Debug
Any CPU
else
Console.Write("Enter grade point average: ");
double gradePointAvg = Convert.ToDouble(Console.ReadLine());
Console.Write("Enter admission test score: ");
double admTestScore = Convert.ToDouble(Console.ReadLine());
if (gradePointAvg >= 3.0 && admTest Score >= 60)
'Console.WriteLine("Accept");
else if (gradePointAvg
Console.WriteLine("Accept");,
↑↓
X 6 Errors
Admission.Program
Console.WriteLine("Reject");
Entire Solution
Code
Description
A CS0642 Possible mistaken empty statement
CS1525 Invalid expression term 'else'
CS1525 Invalid expression term 'else'
C# Interactive (.NET Framework 64-bit) Error List Output
Ready
A 1 Warning
Start
<= 3.0 && admTestScore >= 80) i
0 0 Messages
Y Build + IntelliSense
G
Help Search (Ctrl+Q)
2 A
40
Project
Admission
Admission
Admission
File
Main()
Program.cs
Program.cs
Program.cs
1
O
P
Ln: 34 Ch: 10
Admission
Active
Active
Active
SPC
Search Error List
Line Suppression State
24
25
25
CRLF
Ix
↑ Add to Source Contr
Expert Solution

Step 1
To print both the grades and a message, "Accept" or "Reject" depending upon the grade values.
Step by step
Solved in 3 steps with 2 images

Recommended textbooks for you

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…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

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)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY