Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
compilation [Le 14/05/2017, 20:10] 41.251.79.121 [Langages C/C++] |
compilation [Le 31/08/2022, 23:33] (Version actuelle) moths-art Passage de http à https sur les liens externes (détecté et corrigé via le bot wiki-corrector (https://forum.ubuntu-fr.org/viewtopic.php?id=2067892) |
||
---|---|---|---|
Ligne 11: | Ligne 11: | ||
Voir le tutoriel [[tutoriel:compilation|Installer un logiciel ou une bibliothèque par compilation]]. | Voir le tutoriel [[tutoriel:compilation|Installer un logiciel ou une bibliothèque par compilation]]. | ||
- | #include <iostream> | + | ===== Langages C/C++ ====== |
- | #include <string> | + | |
- | #include<fstream> | + | |
- | using namespace std; | + | |
- | const int semestre =6; | + | |
- | void saisie(float [], int , int ); | + | |
- | int i,moyenne;float som; | + | |
- | struct smp{string nom; | + | |
- | string prenom; | + | |
- | float note[6]; | + | |
- | }; | + | |
- | main(){smp etudiant; | + | |
- | ofstream file; | + | |
- | file.open("devoir.dat"); | + | |
- | for(int j=1;j<=20;j++){cout<<"\nsaisir le nom : \t";cin>>etudiant.nom; | + | |
- | cout<<"\nsaisir le prenom : \t";cin>>etudiant.prenom; | + | |
- | file<<etudiant.nom<<"\t"<<etudiant.prenom; | + | |
- | file<<"\n======================================================\n"; | + | |
- | for(int nsession =1;nsession <= semestre;nsession ++){saisie(etudiant.note , 6 ,nsession); | + | |
- | for(i=0;i<6;i++) file<<etudiant.note[i]<<"\t";som=etudiant.note[0]+etudiant.note[1]+etudiant.note[2]+etudiant.note[3]+etudiant.note[4]+etudiant.note[5];moyenne=som/6; | + | |
- | switch(moyenne){ | + | |
- | case 10:{file<<"moyenne"<<endl;break;} | + | |
- | case 11:{file<<"passable"<<endl;break;} | + | |
- | case 12:{file<<"a.bien"<<endl;break;} | + | |
- | case 13:{file<<"a.bien"<<endl;break;} | + | |
- | case 14:{file<<"bien"<<endl;break;} | + | |
- | case 15:{file<<"bien"<<endl;break;} | + | |
- | case 16:{file<<"t.bien"<<endl;break;} | + | |
- | case 17:{file<<"t.bien"<<endl;break;} | + | |
- | case 18:{file<<"exillent"<<endl;break;} | + | |
- | case 19:{file<<"exillent"<<endl;break;} | + | |
- | case 20:{file<<"rak jan assat"<<endl;break;} | + | |
- | default: | + | |
- | file<<"ajournee"<<endl; | + | |
- | } | + | |
- | file<<"moyenne"<<nsession<<":"<<moyenne; | + | |
- | file<<endl;}} | + | |
- | file.close(); | + | |
- | } | + | |
- | void saisie(float tab[],int n,int ns){ | + | |
- | float *p =&tab[0]; | + | |
- | cout<<"\n semestre :\t"<<ns; | + | |
- | cout<<"saisir ls notes des 6 modules :\n"; | + | |
- | while(p<tab+n){cin>>*p;p++;} | + | |
- | } | + | |
==== Installation du compilateur GNU C et du compilateur GNU C++ ==== | ==== Installation du compilateur GNU C et du compilateur GNU C++ ==== | ||
Ligne 77: | Ligne 34: | ||
==== Reverse engineering ==== | ==== Reverse engineering ==== | ||
- | == Si vous pratiquez le reverse engineering == | + | === Si vous pratiquez le reverse engineering === |
- | + | [[http://bokken.re|Bokken]],un framework en python basé sur Radare sous licence libre\\ | |
- | *[[http://bokken.re|Bokken]],un framework en python basé sur Radare sous licence libre\\ | + | |
permet de faire de l'analyse de binaire. Il supporte les fichiers au format PE, Elf et mach0, et les architectures ARM, i386 et x86-64 | permet de faire de l'analyse de binaire. Il supporte les fichiers au format PE, Elf et mach0, et les architectures ARM, i386 et x86-64 | ||
+ | |||
===== Langage java ===== | ===== Langage java ===== | ||
- | |||
==== Installation du compilateur Java GNU gcj ==== | ==== Installation du compilateur Java GNU gcj ==== | ||
Ligne 100: | Ligne 56: | ||
===== Langage Fortran ===== | ===== Langage Fortran ===== | ||
- | |||
==== Installation du compilateur Fortran GNU ==== | ==== Installation du compilateur Fortran GNU ==== | ||
- | |||
Pour installer le compilateur GNU Fortran, [[:tutoriel:comment_installer_un_paquet|installez le paquet]] **[[apt>gfortran]]**. | Pour installer le compilateur GNU Fortran, [[:tutoriel:comment_installer_un_paquet|installez le paquet]] **[[apt>gfortran]]**. | ||
==== Installation du compilateur Intel® Fortran ==== | ==== Installation du compilateur Intel® Fortran ==== | ||
- | |||
Voir la doc [[fortran#intel_fortran_compiler|fortran]]. | Voir la doc [[fortran#intel_fortran_compiler|fortran]]. | ||
===== Langage Pascal ===== | ===== Langage Pascal ===== | ||
- | + | [[fpc]] - Compilateur Free Pascal, utilisé par l'IDE [[Lazarus]]. | |
- | Voici deux compilateurs Pascal: | + | |
- | + | ||
- | *[[fpc]] - Compilateur Free Pascal, utilisé par l'IDE [[Lazarus]]. | + | |
- | *[[gpc]] - Compilateur Pascal GNU. | + | |
===== Langage OCaml ===== | ===== Langage OCaml ===== | ||
- | Langage développé en France par l'INRIA ([[http://caml.inria.fr/]]). | + | Langage développé en France par l'INRIA ([[https://caml.inria.fr/]]). |
- | * [[ocamlc]] et [[ocamlopt]] - Compilateur bytecode et code natif. | + | * **[[apt>ocaml]]** et **ocamlopt** - Compilateur bytecode et code natif. |
- | * [[js_of_ocaml]] - Compilateur vers JavaScript. | + | * **js_of_ocaml** - Compilateur vers JavaScript. |
===== Installation des outils GNU autotools ===== | ===== Installation des outils GNU autotools ===== | ||