computer sience

Anonymous
timer Asked: Nov 13th, 2016

Question description

Rubric:

Plan 2 points: Provide in your solution folder a Flowchart, pseudocode, photo of of your hand-written plan, or type-written algorithm about how you plan to solve the below problem.
Filename: Lab6_Plan_YourLastName.docx/vsdx Remember Plan First, Then Code. That is, you may use any technique for planning that you like as long as you do so, and prove to me in this file that you did so.

Code 8 points: Zip file of entire solution Folder including planning file.

TASK:

For Max Points Possible, be sure to validate user input as per the techniques discussed in class, or as per another manner.

1. Create a Folder on your saving location called “ Lab6_YourLastName

PART 1

In your Lab6_YourLastName folder, create a C++ Program called Lab6_Part1_YourFirstName_YourLastName.cpp

Write a console application for the following.

*Scenario: Create a C++ Program to accept input from the user while the value entered does not equal -1 (the exit value).

o If any number other than -1 is entered by the user output to the screen

o The number entered times itself (n*n) Make this variable of type Double

o The number entered divided by itself (n/n) Make this Variable of Type Double

o Also Output (n+3)/5

o Also Output [ ( (n+3)/5 ) + ( (n+7)/2 ) ]

Initialized a counter variable called counter to 0
Increment counter by 1 with each loop of your program
Output the value of the counter to the screen of the users after the program exits.

Test Values:7, 10, -44, 0, j (did anything interesting happen with 0 and j...) write a note in your comments of the program about it...

Add a Multiple line C++ comment to the top of the program with your first name, last name, course name section, Name of Text Editor/Software used to create the program, and the a summary of what the program does.

Add appropriate C++ Comments to explain the logic behind your chosen method for solving the problem. Comments are also helpful for the reference of future programmers, and for you.

Use the appropriate data types, variables, and constant variables to solve the program

Trace the program twice using the following data: 100, 12, 7, 0,-1.

Save, build and execute your program.

PART 2

In your Lab6_YourLastName folder, create a C++ Program called Lab6_Part2_YourFirstName_YourLastName.cpp

Write a console application for the following.

(Assignment inspired by: Source)

Ordinals. Write a program that takes a command line argument N and prints out the first N ordinals, followed byHello.

% C++ Ordinals 22
1st Hello
2nd Hello
3rd Hello
4th Hello
5th Hello ...
10th Hello
11th Hello
12th Hello
13th Hello ...
20th Hello
21st Hello
22nd Hello Hint: consider using (i % 10) and (i % 100)to determine when to use "st", "nd", "rd", or "th" for printing the ith Hello.

Add a Multiple line C++ comment to the top of the program with your first name, last name, course name section,Name of Text Editor/Software used to creae the program, and the a summary of what the program does.

Add appropriate C++ Comments to explain the logic behind your chosen method for solving the problem. Comments are also helpful for the reference of future programmers, and for you.

Use the appropriate data types, variables, and constant variables to solve the program

Trace the program twice using the following data: 22, 11, 15, 5, 1, 8, 0, m.

Save, build and execute your program.

Using zip software, Zip the Entire Lab6_YourLastName folder naming the resulting file Lab6_YourLastName.zip

Tutor Answer

(Top Tutor) Studypool Tutor
School: New York University
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors