debut TP16
This commit is contained in:
18
DEV1.1/TP15/zero.c
Normal file
18
DEV1.1/TP15/zero.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int zero(double a) {
|
||||
a = 0.0;
|
||||
return a;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
double x=37.5;
|
||||
printf("avant : %f\n", x);
|
||||
x=zero(x);
|
||||
printf("après : %f\n", x);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/*Elle ne fait pas son travaille car la fonction ne renvoie
|
||||
rien et que la valeur 0 n'est pas atribuées*/
|
||||
Reference in New Issue
Block a user