fork download
  1. #include <stdio.h>
  2. #include<math.h>
  3. int main(void) {
  4. int i,n,t;
  5. double x,scientific_x;
  6. scanf("%d",&n);
  7. for(i=1;i<=t;i++){
  8. scanf("%lf",&x);
  9. int n=floor(log10(fabs(x)));
  10. double scientific_x=x/pow(10,n);
  11. printf("%.6f %d\n",scientific_x,n);
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5284KB
stdin
2
111.111111
1234567.89
stdout
Standard output is empty