You will need to submit: A copy of the Module 6 lab document with answers for the self-test exercises as specified on the lab document. Name this document “ Lab6SelfTest ” The source code for the for...

1 answer below »

You will need to submit:



  • A copy of the Module 6 lab document with answers for the self-test exercises as specified on the lab document. Name this document “Lab6SelfTest

  • The source code for the for loop version of the Test Score program – Name this file“lab6For.cpp".

  • The source code for the while loop version of the Test Score program– Name this file“lab6While.cpp"






  • TEST RUN - Copy the test run output from your program and paste in to the bottom of your source code. Make each line a comment so that all you need to do is submit your source code and your output will be at the bottom of your program.




CSC121Module6Fall2021Student/~$C121Module6LabSpring2021.docx CSC121Module6Fall2021Student/CSC121Module6LabFall2021.docx CSC121 Lab 6: More Loops Name Part 1 Complete the following Self-Test exercises (each program should allow the user to enter the data being tested as often as the user wishes): Selecting the type of loop to use: · All types of iteration can be implemented using While loops. Although do..while and for loops provide certain efficiencies, any situation that requires a loop can be implemented with a while loop. · When using loops it is always important that you consider the 5 requirements for a loop that we have discussed previously, regardless of the type of loop that you use. · While-loops are typically used for all loops when there might be occasions when the loop should not run · Do-while loops are used for all other loops when the loop must always run at least once · for-loops are typically selected when doing numeric calculations, especially when using a variable changed by equal amounts each time the loop iterates There are a large number of exercises both here and in MPL covering iteration. This is an important topic that you need to master. Practice, Practice, Practice. · Page 144, # 21 - 24 Increment and Decrement Operators · Page 151 # 25 - 29 Type of Loop · Page 152 # 30 - 32 Type of Loop Save this document as Lab6SelfTest. Part 2 (Make sure your test runs look just like the test run shown below.) A. As in previous labs, RESIST THE URGE TO CODE! Determine what data will be necessary in order to complete this task. Then design the steps necessary to process that data. Do you need if statements? Do you need loops? Do you need if statements within your loops? Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score (display the student’s name and score). Also calculate the average score and indicate by how much the highest score differs from the average. Use a for loop. Name this program lab6For.cpp. Test Data: Ben Simmons70 Carson Wentz80 Joel Embiid90 Bryce Harper75 B. Redo Problem A. Replace the for loop with a while loop. Name this program lab6While.cpp. Test Run Please enter the number of students: 4 Enter the student name: Ben Simmons Enter the score: 70 Enter the student name: Carson Wentz Enter the score: 80 Enter the student name: Joel Embiid Enter the score: 90 Enter the student name: Bryce Harper Enter the score: 75 Joel Embiid score is 90 the average is 78.75 the difference is 11.25 Press any key to continue . . .
Answered 1 days AfterOct 11, 2021

Answer To: You will need to submit: A copy of the Module 6 lab document with answers for the self-test...

Aditya answered on Oct 12 2021
142 Votes
#include
using namespace std;
int main()
{
int account_number;
double balance
= 0.00;
cout<<"Enter the account number: ";
cin>>account_number;
cout<<"Enter the initail balance: ";
cin>>balance;
char transaction_type;
do
{
cout<<"SAVINGS ACCOUNT TRANSACTION"< cout<<"(W)ithdrawal"< cout<<"(D)eposit"< ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here