0% found this document useful (0 votes)
52 views

Week005 Lab4 HandlingPrimitiveDataTypes Edited

This document provides instructions for a laboratory exercise on collecting and displaying data in C++. The objective is for students to practice using input and output streams to accept user input and display it back in various formats. Students are given 4 problems to solve by writing C++ programs that accept user data through cin and display it with cout. They are instructed to create projects in Visual Studio Code for each problem, save the files, and submit screenshots in a Word document.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Week005 Lab4 HandlingPrimitiveDataTypes Edited

This document provides instructions for a laboratory exercise on collecting and displaying data in C++. The objective is for students to practice using input and output streams to accept user input and display it back in various formats. Students are given 4 problems to solve by writing C++ programs that accept user data through cin and display it with cout. They are instructed to create projects in Visual Studio Code for each problem, save the files, and submit screenshots in a Word document.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Course Code CS201

Description Computer Programming 1

Laboratory
Title of
Exercise 004 Data, I need Data!
Activity
No.
Page 1 of 2
LABORATORY EXERCISE
In this activity, you will be given a series of problems that will challenge your logical understanding of C+
+ covered by the modules, and not. For each problem, you are expected to create a project and write a
working solution depending on the requirements of the problem.

Always keep in mind, think outside the box.

Objective/s:
At the end of this activity, the students are expected to be able to:
 discuss the implications of the given problems
 use the cin>> and cout<< statements correspondingly
 declare variables that will hold the data entered by the user

Material/s Needed:
 Visual Studio Code
 MinGW

Procedure:
1. Make sure you have a running version of the “Hello World” application shown in Module 004. If
not, review the steps to setup your Work Environment.
2. There will be a series of problems you are required to code. For each, you need to provide C++
codes for the actual solution.
3. Keep the project files for record as they may be requested by the instructor.

Questions:
1. Write a program that accepts user’s section, and display them back with the format “*** Section:
user’s section ***”.
2. Write a program that accepts user’s daily budget and display the product of the daily budget and
itself.
3. Write a program that accepts user’s name, password and address and display them back using the
format “Hi, I am user’s name. I live at user’s address.”.
Restrictions:
 Use only three variables.
 Make sure you support spaces.
4. What can you conclude from this activity?

INSTRUCTIONS FOR THE STUDENTS:


1
Course Code CS201

Description Computer Programming 1

Laboratory
Title of
Exercise 004 Data, I need Data!
Activity
No.
Page 2 of 2
LABORATORY EXERCISE
 The filename of your lab activity should be:
“<Last Name><First Name>-LaboratoryExercise0<XX>”
 Provide screenshots of your VS codes and program output copied to a Word file.
 Upload the Word file to the link provided for the activity in the LMS.

You might also like