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,17 @@
#include "functions.h"
float PI = 3.141592;
float Perimetre(float rayon) {
float perimetre;
perimetre = PI * rayon * 2;
return perimetre;
}
float Surface(float rayon) {
float surface;
surface = PI * rayon * rayon;
return surface;
}

View File

@@ -0,0 +1,10 @@
// Fonctions d'Affichage
void Presentation(void);
void afficherResultats(float, float);
// Fonction de Saisie
float saisieRayon(void);
// Fonctions de Calcul
float Perimetre(float);
float Surface(float);

View File

@@ -0,0 +1,20 @@
#include <iostream>
#include "functions.h"
using namespace std;
void Presentation() {
cout << "Cet algortihme calcule le périmètre et la surface d'un disque de rayon saisi" << endl;
}
void afficherResultats(float perimetre, float surface) {
cout << "Perimètre : " << perimetre << "u.a." << endl;
cout << "Surface : " << surface << "u.a.²" << endl;
}
float saisieRayon() {
float rayon;
cout << "Saisir une rayon" << endl;
cin >> rayon;
return rayon;
}

Binary file not shown.

View File

@@ -0,0 +1,17 @@
#include "functions.h"
int main() {
float rayon;
float perimetre;
float surface;
Presentation();
rayon = saisieRayon();
perimetre = Perimetre(rayon);
surface = Surface(rayon);
afficherResultats(perimetre, surface);
return 0;
}