| Course: |
CMPSC 201 |
| Project #: |
BONUS |
| NSD: |
(see the calendar on Angel) |
| Deadline: |
(see the calendar on Angel) |
| Project: |
a:cramers.bpr |
| Program: |
a:cramers.cpp |
| Input: |
a:cramers.dat |
| Output: |
a:cramers.txt |
| Objective: |
To use an input text file and utilize recursion. |
| Problem: |
Write a highly modularized C++ program that will determine the exact solution to a
system of simultaneous linear equations in at most 9 variables
according to Cramer's Rule.
|
| Input: |
Use the following data: |
| |
- First set of equations
| |
2 x1 |
+ |
x2 |
|
x3 |
|
2 x4 |
= |
|
2 |
| |
4 x1 |
+ |
4 x2 |
+ |
x3 |
+ |
3 x4 |
= |
|
4 |
| |
6 x1 |
|
x2 |
+ |
10 x3 |
+ |
10 x4 |
= |
|
5 |
| |
2 x1 |
+ |
x2 |
+ |
8 x3 |
+ |
4 x4 |
= |
|
1 |
- Second set of equations
| 475 x1 |
|
316 x2 |
|
407 x3 |
+ |
253 x4 |
= |
521 |
| 291 x1 |
|
482 x2 |
|
395x3 |
+ |
242 x4 |
= |
720 |
| 364 x1 |
|
421 x2 |
|
643 x3 |
+ |
342 x4 |
= |
634 |
| 282 x1 |
|
286 x2 |
|
315 x3 |
+ |
448 x4 |
= |
266 |
- Third set of equations
| |
2 x1 |
|
2 x2 |
+ |
4 x3 |
= |
|
12 |
| |
2 x1 |
+ |
3 x2 |
+ |
2 x3 |
= |
|
8 |
| |
x1 |
+ |
x2 |
|
x3 |
= |
|
3.5 |
- Fourth set of equations
| |
8 x1 |
|
2 x2 |
+ |
x3 |
|
|
|
|
= |
1 |
| |
2 x1 |
+ |
8 x2 |
|
2 x3 |
+ |
x4 |
|
|
= |
1 |
| |
x1 |
|
2 x2 |
+ |
8 x3 |
|
2 x4 |
+ |
x5 |
= |
1 |
| |
|
|
x2 |
|
2 x3 |
+ |
8 x4 |
|
2 x5 |
= |
1 |
| |
|
|
|
|
x3 |
|
2 x4 |
+ |
8 x5 |
= |
1 |
|
| Output: |
Start a new page of output textfile for each system of equations and print that values of all the variables.
|
| Reminder: |
Follow General Instructions for Programming and the
Basic Formatting Guidelines.
|