docs: 📝 Create documentation

This commit is contained in:
Louis Gallet 2024-09-08 16:45:21 +02:00
parent d270bc4674
commit df7914a88e
Signed by: lgallet
GPG Key ID: 84D3DF1528A84511
2 changed files with 30 additions and 1 deletions

View File

@ -10,7 +10,16 @@ int valeurMax(int tab[], int n);
void additionMatrice(int matrice1[3][3], int matrice2[3][3], int resultat[3][3]);
void afficherMatrice(int matrice[3][3]);
void afficherMatrice(int matrice[3][3]) {
// This functions prints a 3x3 matrix in the console
for (int i = 0; i < 3; i++) {
printf("|");
for (int j = 0; j < 3; j++) {
printf("%d ", matrice[i][j]);
}
printf("|\n");
}
}
void inverserChaine(char chaine[]);

20
README.md Normal file
View File

@ -0,0 +1,20 @@
# AI Generated exam
## Exercise 1:
Write a function that takes an integer N as a parameter and returns the sum of all even numbers from 1 to N. Use a for or while loop to go through the numbers and check if they are even. If so, add them to the sum.
## Exercise 2:
Write a function that takes an integer N as a parameter and displays a triangle of size N. Use nested loops to manage the display of rows and columns.
## Exercise 3:
Write a function that takes an array of integers array[] and an integer size (the size of the array). The function must return the maximum value of the array. Use a loop to go through all the elements in the array.
## Exercise 4:
Write a function that takes two 3x3 matrices (two two-dimensional arrays) as parameters, and fills a third array resultat with the sum of the two matrices. Use nested loops to cycle through each element of the matrix.
## Exercise 5:
Write a function that takes a string (char array) and inverts its contents. Use a loop to traverse the string, and a swap algorithm to invert the characters.
## Exercise 6:
Write a function that takes a string of characters as a parameter and returns the number of vowels (a, e, i, o, u) it contains. Loop through each character in the string and check if it's a vowel.