20 lines
367 B
C
20 lines
367 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
|
|
int main(void){
|
|
float reel;
|
|
int entier;
|
|
int decimal;
|
|
int pui;
|
|
printf("rentrez un réel :");
|
|
scanf("%f", &reel);
|
|
entier = trunc(reel);
|
|
decimal = reel - entier;
|
|
pui = log10(decimal)+1;
|
|
printf(" L'écriture scientifique de ce réel est : %d x %d10^-%d",entier,decimal,pui);
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|
|
|