Function: This program determines if a student will be admitted or rejected. Input: Interactive Output: Accept or Reject */ #include using namespace std; int main() { // Declare variables // Prompt for and get user input // Test using admission requirements and print Accept or Reject if(testScore >= 90) { if(classRank >= 25) { cout << "Accept" << endl; } else cout << "Reject" << endl; } else { if(testScore >= 80) { if(classRank >= 50) cout << "Accept" << endl; else cout << "Reject" << endl; } else { if(testScore >= 70) { if(classRank >=75) cout << "Accept" << endl; else cout << "Reject" << endl; } else cout << "Reject" << endl; } } } //End of main() function
Function: This program determines if a student will be admitted or rejected. Input: Interactive Output: Accept or Reject */ #include using namespace std; int main() { // Declare variables // Prompt for and get user input // Test using admission requirements and print Accept or Reject if(testScore >= 90) { if(classRank >= 25) { cout << "Accept" << endl; } else cout << "Reject" << endl; } else { if(testScore >= 80) { if(classRank >= 50) cout << "Accept" << endl; else cout << "Reject" << endl; } else { if(testScore >= 70) { if(classRank >=75) cout << "Accept" << endl; else cout << "Reject" << endl; } else cout << "Reject" << endl; } } } //End of main() function
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
Function: This program determines if a student will be admitted or rejected.
Input: Interactive
Output: Accept or Reject
*/
#include <iostream>
using namespace std;
int main()
{
// Declare variables
// Prompt for and get user input
// Test using admission requirements and print Accept or Reject
if(testScore >= 90)
{
if(classRank >= 25)
{
cout << "Accept" << endl;
}
else
cout << "Reject" << endl;
}
else
{
if(testScore >= 80)
{
if(classRank >= 50)
cout << "Accept" << endl;
else
cout << "Reject" << endl;
}
else
{
if(testScore >= 70)
{
if(classRank >=75)
cout << "Accept" << endl;
else
cout << "Reject" << endl;
}
else
cout << "Reject" << endl;
}
}
} //End of main() function

Transcribed Image Text:gage.comtaIcn
CENGAGE MINDTAP
Using Flowcharts and Pseudocode to Write a C++ Program
Using Flowcharts and Pseudocode
CollegeA
1/* Pr
to Write a C++ Program
2.
Fur
3.
Inp
Summary
4.
Out
5 */
</>
96.
In this lab, you use the flowchart and pseudocode
found in the figures below to add code to a partially
7 #inclu
8 using
created C++ program. When completed, college
9 int ma
admissions officers should be able to use the C++
10 f
program to determine whether to accept or reject a
11
//
student, based on his or her test score and class
12
13
rank.
14
// F
15
16
start
17
18
if(t
Declarations
num originalNumber
num calculatedAnswer
19
20
21
input
originalNumber
22
This is the priming
input.
23
24
el
Yes
25
cout
not eof?
26
27
else
No
calculatedAnswer =
28
stop
originalNumber 2
29
if
30
output
calculatedAnswer
32
COL
33
else
This step gets all
subsequent inputs.
in Open image in a new tab
origina INumber
34
Cou
35
36
els
37
38
start
39
input testScore, classRank
40
if testScore >= 90 then
41
if classRank >= 25 then
codevolve-assets/cengage/PLD-9th/PLD9_C++_Chp3_Flowchart.png
m.
![ge Learning
9how to apply text shadow in
O(342) YouTube
ps://ng.cengage.com/static/nb/ui/evo/index.html?elSBN=97813372746098id=D1075460596
く
CENGAGE MINDTAP
Using Flowcharts and Pseudocode to Write a C++ Program
Using Flowcharts and Pseudocode
Col
to Write a C++ Program
udy Tools
2
else
3.
if testScore >= 70 then
4)
if classRank = 75 then
5*
output "Accept"
7 #1
s Tips
else
8 us
output "Reject"
9 in
s Tips
endif
10 {
else
11
YOU
output "Reject"
12
endif
endif
14
endif
15
stop
16
c of an
17
18
19
Instructions
20
21
1. Study the pseudocode in picture above.
22
2. Write the interactive input statements to retrieve:
23
o A student's test score ( testScore)
25
26
el
| 28
o A student's class rank (classRank )
27
3. The rest of the program is written for you.
29
4. Execute the program by clicking the Run button.
Enter 87 for the test score and 60 for the class
31
32
rank.
33
els
5. Execute the program by entering 60 for the test
34
35
score and 87 for the class rank.
36
37
[comment]: > (3. Write the statements to convert
38
the string representation of a student's test score and
39
class rank to the integer data type ( testScore and
40
41
classRank, respectively).)
421
43
耳
4
!!
目](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4bfbb203-4399-4804-a6b8-bbfebafe4401%2F24546887-8bb0-4047-8ba0-0b5c9802a572%2Fgdsfqwm_processed.jpeg&w=3840&q=75)
Transcribed Image Text:ge Learning
9how to apply text shadow in
O(342) YouTube
ps://ng.cengage.com/static/nb/ui/evo/index.html?elSBN=97813372746098id=D1075460596
く
CENGAGE MINDTAP
Using Flowcharts and Pseudocode to Write a C++ Program
Using Flowcharts and Pseudocode
Col
to Write a C++ Program
udy Tools
2
else
3.
if testScore >= 70 then
4)
if classRank = 75 then
5*
output "Accept"
7 #1
s Tips
else
8 us
output "Reject"
9 in
s Tips
endif
10 {
else
11
YOU
output "Reject"
12
endif
endif
14
endif
15
stop
16
c of an
17
18
19
Instructions
20
21
1. Study the pseudocode in picture above.
22
2. Write the interactive input statements to retrieve:
23
o A student's test score ( testScore)
25
26
el
| 28
o A student's class rank (classRank )
27
3. The rest of the program is written for you.
29
4. Execute the program by clicking the Run button.
Enter 87 for the test score and 60 for the class
31
32
rank.
33
els
5. Execute the program by entering 60 for the test
34
35
score and 87 for the class rank.
36
37
[comment]: > (3. Write the statements to convert
38
the string representation of a student's test score and
39
class rank to the integer data type ( testScore and
40
41
classRank, respectively).)
421
43
耳
4
!!
目
Expert Solution

Step 1
Required:
Function: This program determines if a student will be admitted or rejected.
Input: Interactive
Output: Accept or Reject
Required code with comments for explanation and screenshot of both code and output has been provided in the next step.
Trending now
This is a popular solution!
Step by step
Solved in 4 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