fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. double sqr[31];
  6. int i;
  7.  
  8. for(i=0; i<31; i++){
  9. sqr[i]=sqrt(i);
  10. }
  11.  
  12. for(i=1; i<31; i++){
  13. printf("%f\n", sqr[i]);
  14. printf("%21.16f\n", sqr[i]);
  15. printf("%20.18f\n", sqr[i]);
  16. }
  17.  
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 4548KB
stdin
Standard input is empty
stdout
1.000000
   1.0000000000000000
1.000000000000000000
1.414214
   1.4142135623730951
1.414213562373095145
1.732051
   1.7320508075688772
1.732050807568877193
2.000000
   2.0000000000000000
2.000000000000000000
2.236068
   2.2360679774997898
2.236067977499789805
2.449490
   2.4494897427831779
2.449489742783177881
2.645751
   2.6457513110645907
2.645751311064590716
2.828427
   2.8284271247461903
2.828427124746190291
3.000000
   3.0000000000000000
3.000000000000000000
3.162278
   3.1622776601683795
3.162277660168379523
3.316625
   3.3166247903553998
3.316624790355399810
3.464102
   3.4641016151377544
3.464101615137754386
3.605551
   3.6055512754639891
3.605551275463989125
3.741657
   3.7416573867739413
3.741657386773941329
3.872983
   3.8729833462074170
3.872983346207417021
4.000000
   4.0000000000000000
4.000000000000000000
4.123106
   4.1231056256176606
4.123105625617660586
4.242641
   4.2426406871192848
4.242640687119284770
4.358899
   4.3588989435406740
4.358898943540673976
4.472136
   4.4721359549995796
4.472135954999579610
4.582576
   4.5825756949558398
4.582575694955839829
4.690416
   4.6904157598234297
4.690415759823429731
4.795832
   4.7958315233127191
4.795831523312719114
4.898979
   4.8989794855663558
4.898979485566355763
5.000000
   5.0000000000000000
5.000000000000000000
5.099020
   5.0990195135927845
5.099019513592784492
5.196152
   5.1961524227066320
5.196152422706632024
5.291503
   5.2915026221291814
5.291502622129181432
5.385165
   5.3851648071345037
5.385164807134503739
5.477226
   5.4772255750516612
5.477225575051661188