Procedural C++ (MS V. Studio)
by Dr Jan Pajak
This Web page allows to look at solutions (i.e. at programs) for various programming
problems that I utilise in my teaching of C++ programming language. In order to run
or to download any of these solutions, simply click on
the underlined part of the description of this solution!
- For further instructions see the end of this Web page.
- Click the button BACK (from the browser) to return to the previous Web page.
The last update of the Web page on:
22 June 2003.
Part A. Course notes for the subject coded PR25n (i.e. PR250). It uses the Microsoft Visual Studio 6.0 C++:
PR25n - e.g. PP250 (i.e. procedural programming in C++ based on the Microsoft Visual Studio 6.0)
This course is designed to provide a basic programming skills in Microsoft-based procedural C++.
Exercise 1 (Typing in, compiling, and running your first C++ program. Keyboard input and screen output statements).
Exercise 2 (Date and time in C++; system commands, string functions and their parameters).
Exercise 3 (Selection and iteration statements in C++).
Exercise 4 (Sequential file handling in C++: .open, .getline, .write, .close functions; backups).
Exercise 5 (Modular programming in C++: functions and menu program).
Exercise 6 (Bubble Sort).
Exercise 7 (Array handling and strings handling in C++).
Exercise 8 (Arithmetic operations in C++).
Assignment 1 for C++. (PR250).
Assignment 1 marking schedule .
Sample problems for final test from PP C++. (PR250)
Part B. Solutions of problems for the subject coded PR25n (e.g. PR250). These solutions
are programmed with Microsoft Visual Studio 6.0 C++:
Leap.cpp: Finding whether a given year is a leap year (source code in C++).
Leap.exe: Finding whetther a given year is a leap year (executable program in C++).
Age.cpp: Determining the age of the user (source code in C++).
Age.exe: Determining the age of the user (executable program in C++).
When.cpp: Determining a next date a number of days apart from today (source code in C++).
When.exe: Determining a next date a number of days apart from tooday (executable program in C++).
Part C. Examples of problems for the subject PR25n (e.g. for PR250).
These problems are solved above with Visual Studio 6.0:
Text of sample problems for PP C++ programming (MS *.doc format).
Text of Assignment 1 for C++ programming (MS *.doc format).
Part D. Solutions for the subject coded PR21n (e.g. PR211). These solutions are programmed
with Borland C++ Builder 5:
Part D. Examples of problems for the subject PR21n (e.g. for PR211). These
problems are solved above with Borland C++ Builder 5. Please notice their unique attribute,
namely that they all are to be marked by students themselves:
Assignment PP1 for PP C++. (PR211).
Assignment PP2 for PP C++. (PR211).
Assignment PP3 for PP C++. (PR211).
Assignment PP4 for PP C++. (PR211).
Assignment PP5 for PP C++. (PR211).
Part E. Instructions on how to use this Web page:
(1) Each C++ program is provided here in two versions, namely (a) as a source code (*.cpp),
which is prepered respectively either in the Microsoft Visual Studio 6 C++ or in Borland C++
Builder 5, and (b) as an executable version of a given C++ program (*.exe).
Each one of these parts needs to be downloaded separately.
(2) In order to download to your computer any of these two versions (*.cpp
or/and *.exe) of a given C++ solution click on this version,
and then follow the instructions that appear in the downloading window.
(3) To return to this Web page, click on the Back
button on the tool palette of your browser.
(4) Some solutions are compressed into standard zip
files. Therefore, you need to unzip them first before they are executed or compiled.
(5) If you wish to see any other related Web pages see the Favorite Links Page
(e.g. the so-called "Blue Book" with prescriptions for PR25n and PR21n courses addressed
here, are available at the Web page
(6) Address for correspondence (June 2003): Dr Jan Pajak, P.O. Box 33250, Petone 6340, New Zealand.
Note that "self-paste" type exercises, which prepare students for solving these programming problems,
are outlined in lecture notes (Exercises 1 to 8 for PP C++ programming).