DEV/DEV1.1/TP10/doubleur.c

16 lines
279 B
C
Raw Normal View History

2022-11-15 11:27:45 +01:00
#include <stdlib.h>
#include <stdio.h>
int somme(int n, int m) {
return n+m;
}
int main(void) {
int valeur;
int* p = (int*) malloc(2*sizeof(int));
printf("Entrez un entier : ");
scanf("%d", p);
printf("Le double vaut %d\n", somme(*p, *p));
return EXIT_SUCCESS;
}