Linear Equation and Matrices in C Programming
Autor: Abdelrahman Attia • February 25, 2016 • Lab Report • 1,321 Words (6 Pages) • 830 Views
[pic 1] |
Introduction to C programming |
Report |
Abdelrahman Tarek Attia |
28/7/2015 |
TP036378
Table of Contents
Introduction
Design of the Program
Source Code of the Program
Sample output
Features
Discussion
Assumptions
References
Introduction
The C programming language is a language closely related to the UNIX operating system for which it was developed. C programming language has an important role to play in the implementation of scientific calculations and engineering calculations.
Introduction to C programming teaches us how to design programs and also teaches us how to implement and document efficient algorithms for C application. Moreover, we were taught how to design and build a console application using C, thus, illustrating the use of C.
In this report has been prepared to clarify and explain the use of C, and how it was used to design a program. Explanation of the source code, inputs, outputs, and additional features in this program that have been used are going to be explained.
Design of the Program
The objective of this program is to allow a user to solve and calculate mathematical problems by just inputting data. A main menu was built in this program so that the user can switch from different mathematical manipulations to perform mathematical calculations.
The main menu:
- Addition of 2x2 matrices.
- Multiplication of 2x2 matrices.
- Inverse of matrix.
- Linear Equation.
- Exit.
[pic 2]
Figure 1: Main menu flowchart
The flowchart in Figure 1 shows how the user can choose the case he/she would like to use for the calculations by simply pressing a number in the main menu. For example if the user wants to solve an “addition of 2x2 matrices” mathematical problem, the user should input 1 then press enter. The user should input 2, 3, 4 to solve either “multiplication of 2x2 matrices,” “inverse of matrix,” or “linear equation,” respectively. In case the user inputs 5, the program is going to exit.
...