First commit

This commit is contained in:
2026-04-08 20:11:20 +02:00
parent 10fe469c10
commit 79f15536a1
861 changed files with 135610 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++ build active file",
"command": "/usr/bin/g++",
"args": [
"-fdiagnostics-color=always",
"-g",
"*.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}

View File

@@ -0,0 +1,10 @@
nomprenom : une fonction (nom : un tableau de caractères, prenom : un tableau de caractères) -> un tableau de caractères
Lexique :
nom_abrege : un tableau de caractères
FCH : le caractère constant de fin de chaine de caractère
Algorithme :
Début
Fin

Binary file not shown.

View File

@@ -0,0 +1,33 @@
#include "fonction.h"
void nomprenom(
const char nom[],
const char prenom[],
char pseudo[]
) {
unsigned int pos = 0;
for (unsigned int i = 0; i < 3 && nom[i] != '\000'; i++) {
pseudo[pos] = prenom[i];
}
pseudo[pos] = '-';
pos++;
for (unsigned int i = 0; i < 3 && prenom[i] != '\000'; i++) {
pseudo[pos] = nom[i];
}
}
/*
Prof:
for i, i < 3 && prenom i != /0
pseudo[pos] = prenom[i]
*/

View File

@@ -0,0 +1 @@
void nomprenom(const char nom[], const char prenom[], char pseudo[]);

Binary file not shown.

View File

@@ -0,0 +1,23 @@
#include <iostream>
#include "fonction.h"
using namespace std;
int main() {
char nom[1000];
char prenom[1000];
const unsigned int _TAILLE_MAX = 8;
char pseudo[_TAILLE_MAX];
cout << "Saisir nom et prenom" << endl;
cin >> prenom >> nom;
nomprenom(nom, prenom, pseudo);
cout << pseudo;
return 0;
}