subject

In this lab, you use the flowchart and pseudocode found in the figures below to add code to a partially created C++ program. When completed, college admissions officers should be able to use the C++ program to determine whether to accept or reject a student, based on his or her test score and class rank. start input testScore,
classRank if testScore >= 90 then if classRank >= 25 then output "Accept"
else output "Reject" endif else if testScore >= 80
then if classRank >= 50 then output "Accept" else output "Reject" endif
else if testScore >= 70
then if classRank >= 75 then output "Accept"
else output "Reject"
endif else output "Reject"
endif
endif
endif
stop
Study the pseudocode in picture above. Write the interactive input statements to retrieve: A student’s test score (testScore) A student's class rank (classRank) The rest of the program is written for you. Execute the program by clicking "Run Code." Enter 87 for the test score and 60 for the class rank. Execute the program by entering 60 for the test score and 87 for the class rank.
[comment]: <> (3. Write the statements to convert the string representation of a student’s test score and class rank to the integer data type (testScore and classRank, respectively).)
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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 22.06.2019 16:50
Consider a slotted aloha system, where the time slot equals the fixed duration of each packet. assume that there are 4 stations a,b,c,d sharing the medium. (a) stations a,b,c,d receive one packet each from higher layers at times 1.3, 1.5, 2.6,5.7 respectively. show which transmissions take place when, according to the slottedaloha protocol; describe all transmissions until all four packets have been successful.when needed, each station has access to the following sequence of random number, provided by a random number generator and drawn uniformly between 0 and 1: (1) station a draws numbers: 0.31, 0.27, 0.78, 0.9, 0.9, 0.11, 0. (2) station b draws numbers: 0.45, 0.28, 0.11, 0.83, 0.37, 0.22, 0. (3)station c draws numbers: 0.1, 0.2, 0.3, 0.4, 0. (4) station d draws numbers: 0.36, 0.77, 0.9, 0.1, 0.1, 0.1, 0.1, 0. (b) in slotted aloha, a station transmits in each time slot with a given probability. what probabilities would you assign to each of the four stations so as to: (i) maximize the efficiency of the protocol? (ii) maximize fairness among the four stations? (c) will the efficiency increase or decrease if we modify slotted aloha as follows: (i) get rid of slots and allow stations to transmit immediately? (ii) implement carrier sensing? (iii) implement collision detection? (iv) implement collision avoidance?
Answers: 3
question
Computers and Technology, 23.06.2019 08:30
All of these are true about using adhesive except: a. dissimilar materials can be joined. b. mixing tips are product and material specific. c. a specific application gun may be required. d. two-part adhesives are dispensed using two mixing tips
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
You know the right answer?
In this lab, you use the flowchart and pseudocode found in the figures below to add code to a partia...
Questions
question
Mathematics, 13.06.2020 05:57
question
Mathematics, 13.06.2020 05:57
Questions on the website: 13722362