UNIVERSITY OF WEST ATTICA
SCHOOL OF ENGINEERING
DEPARTMENT OF COMPUTER ENGINEERING AND INFORMATICS
University of West Attica · Department of Computer Engineering and Informatics
Computer Programming
Vasileios Evangelos Athanasiou
Student ID: 19390005
Supervision
Supervisor: Nikolaos Vassilas, Professor
Co-supervisor: Georgios Meletiou, Laboratory Teaching Staff
Athens, November 2021
The project covers fundamental concepts of the C programming language, with emphasis on variables, standard input/output, operators, and increment mechanisms, supported by practical source code examples.
| Section | Folder / File | Description |
|---|---|---|
| 1 | assign/ |
Assignment material |
| 1.1 | assign/project2.png |
Assignment description / problem statement (English) |
| 1.2 | assign/εργασία2.png |
Assignment description / problem statement (Greek) |
| 2 | docs/ |
Theoretical documentation |
| 2.1 | docs/Basic-Elements.pdf |
Basic programming elements and concepts (English) |
| 2.2 | docs/Βασικά-Στοιχεία.pdf |
Basic programming elements and concepts (Greek) |
| 3 | src/ |
Source code implementations |
| 3.1 | src/CubeSphere.c |
Geometric computation: cube–sphere problem |
| 3.2 | src/MathsIntegers.c |
Integer arithmetic and mathematical operations |
| 4 | README.md |
Repository overview and instructions |
A variable is a designated memory location used to temporarily store data during program execution.
- The stored data can change during execution.
- Users define meaningful variable names for easier understanding and maintenance.
int– Integersfloat,double– Decimal (floating-point) numberschar– Single charactersbool– Logical (true/false) values
- The input channel, usually the keyboard, used to enter data into a program.
- Function:
scanf()- Reads user input.
- Stores it in a variable using the address-of operator (
&).
- The output channel, usually the screen, used to display program data.
- Function:
printf()- Prints text messages or variable values to the console.
Used to perform mathematical calculations:
- Addition (
+) - Subtraction (
-) - Multiplication (
*) - Division (
/) - Modulus (
%)
Used to compare values and return:
1(True) or0(False)
Examples:
==,!=,<,>
Used to combine or negate conditions:
| Operator | Description |
|---|---|
&& (AND) |
Produces 1 only if both operands are 1 |
|| (OR) |
Produces 1 if at least one operand is 1 |
! (NOT) |
Reverses the logical value (1 → 0, 0 → 1) |
-
Pre-increment (
++x)
Increases the variable value by one before it is used in an expression. -
Post-increment (
x++)
Uses the current value of the variable before increasing it by one.
The following programs are included and fully documented in the report:
-
MathsIntegers.c
Focuses on:- Integer arithmetic
- Program structure
- Variable usage and value flow
-
CubeSphere.c
Covers:- Calculations related to geometric shapes
- Example computations
- Technical remarks and implementation details

