1.7 Lab Exercise 1a: Write an algorithm Before you write any code (in C++), you need to write the algorithm in English. The algorithm is the description of the problem and desired solution. It must include a list or description of the input (if there is any, such as something the user types), output (usually what will be printed onscreen, though it might be also written to a file), and the steps to create the output. For this exercise, add comments to the top of the program below, describing an algorithm for sorting a random stack of paper money, to increasing in value top to bottom. Each line of comment must begin with //. Ignore the code in the program below, but don't delete it. Be sure your comment algorithm includes the following lines, which should begin with the first word in each line below, and replace the underscore with your description of each item for this problem: // input: // output: // steps: ( The first is given for you below:) // 1. pick up a bill and determine its value // 2. 3. 403714.3402758.za/7 LAB ACTIVITY 1 //Type your algorithm here, as comments: 11 12 int main() // program to copy itself to screen 13 string s://holds a line of the file 14 15 362909 1.7.1: Lab Exercise 1a: Write an algorithm 6 // don't change the lines below. They are code to copy this entire file to the screen for testing... 7 #include 8 #include 9 #include 10 using namespace std; 16 17 18 ifstream ini("./main.cpp"); while (getline(in1.s)) etc... cout << s << endl; //copy line to screen return 0; main.cpp Load default template...
1.7 Lab Exercise 1a: Write an algorithm Before you write any code (in C++), you need to write the algorithm in English. The algorithm is the description of the problem and desired solution. It must include a list or description of the input (if there is any, such as something the user types), output (usually what will be printed onscreen, though it might be also written to a file), and the steps to create the output. For this exercise, add comments to the top of the program below, describing an algorithm for sorting a random stack of paper money, to increasing in value top to bottom. Each line of comment must begin with //. Ignore the code in the program below, but don't delete it. Be sure your comment algorithm includes the following lines, which should begin with the first word in each line below, and replace the underscore with your description of each item for this problem: // input: // output: // steps: ( The first is given for you below:) // 1. pick up a bill and determine its value // 2. 3. 403714.3402758.za/7 LAB ACTIVITY 1 //Type your algorithm here, as comments: 11 12 int main() // program to copy itself to screen 13 string s://holds a line of the file 14 15 362909 1.7.1: Lab Exercise 1a: Write an algorithm 6 // don't change the lines below. They are code to copy this entire file to the screen for testing... 7 #include 8 #include 9 #include 10 using namespace std; 16 17 18 ifstream ini("./main.cpp"); while (getline(in1.s)) etc... cout << s << endl; //copy line to screen return 0; main.cpp Load default template...
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
Need help and I am allowed to help.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
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