Ajoutez des fichiers projet.
This commit is contained in:
32
CPP/Source1.cpp
Normal file
32
CPP/Source1.cpp
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Programme d'affichage du plus grand nombre parmis 3 propositions
|
||||
* Par Florian Goussot
|
||||
* BTS CIEL 2e ann<6E>e
|
||||
* Fait le 10/09/2024 <20> Nancy
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(void) {
|
||||
int a, b, c;
|
||||
char key;
|
||||
printf("\t\t\tLe plus grand\n");
|
||||
printf("Entrez trois nombres entiers s<>par<61>s par des espaces : ");
|
||||
scanf_s("%d %d %d", &a, &b, &c);
|
||||
if (b < c) {
|
||||
b = c;
|
||||
}
|
||||
if (a < b) {
|
||||
a = b;
|
||||
}
|
||||
printf("Le nombre le plus grand est %d", a);
|
||||
printf("\n\nPour quitter, appuyez simultan<61>ment sur CTRL+ALT+SHIFT+ALTGR+... juste sur Echap en fait ;)\n\n");
|
||||
scanf_s("%c", &key);
|
||||
if (key == 27) {
|
||||
return 0;
|
||||
}
|
||||
else {
|
||||
main();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user