Lab One Solution

$30.00 $24.90

Description

Objectives:
The objective of this lab is to give you some practice doing C++ Console I/O.

After completing this lab, you should be pretty comfortable writing programs that do console I/O using C++.

Creating the Project
Follow these steps to create the project for this exercise:

1.Before starting Visual Studio, be sure that you have created a folder in which to store your CS 1410 work.
2.Inside this folder, create a folder for this lab. Name it lab01.
3. Now, start up Visual Studio.
4. Start a new Project and store it in the folder that you created for this project.
5. Name the project lab01.
6. Create a new C++ source code file. Name it lab01.cpp.
7. Now, type in the lines of C++ source code shown below. Pay attention to the spacing and indentation used in the code.
Substitute your own name and course information where appropriate. You must supply your own code in the section marked. When you are done, save the file.
8. Build and run your project.

// Lab One Programming Exercise
// CS 1410
// your name
// CS 1410 — your Section number
// ————————–

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

int main( )
{
// declarations
int age;
float value;
string name;

// Here you must supply code that does the following:
// Your program must work in the order described
// (you can use the following as pseudo-code):
// Prompt the user for their age
// Get their age and store it in the variable age
// Prompt the user for how much money they have
// Get the amount of money and store it in the variable value
// Prompt the user to enter their full name.
// Get their name and store it in the string variable name
// Now display the following:
// The person’s name. You must display the full name
// The person’s age
// The money the person has. Display a dollar sign and two digits
// after the decimal point.
system(“PAUSE”);
return 0;
}

Submitting Your Assignment:
After you are satisfied that your program works correctly, place the following files in a zip folder and submit it to Canvas as Lab #1.

lab01.cpp
lab01.exe

Grading:
o (All source code files contain a complete function prologue
o Source code files contain declaration that you did not copy code
o Project has been properly submitted to Canvas
o Code meets style guidelines)
o The program works correctly.