sync: 2026-11-23 16:20
This commit is contained in:
1 parent
d7160b680b
commit
fa80bf4020
1 file changed
+18
@@ -1114,3 +1114,21 @@ int majeur(const etudiant* e) {
|
||||
}
|
||||
```
|
||||
|
||||
## Éxercice
|
||||
|
||||
Écrivez un programme qui demande un entier naturel à l'utilisateur et qui créer un Fichier nommé suite.bin contenant les valeurs 0,1,2... jusqu'ç l'entier choisi, au format short.
|
||||
|
||||
```c
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
int main(void) {
|
||||
short choice;
|
||||
if(scanf("%hd",&choice) < 1) {
|
||||
printf("an error as occured while reading ");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user