fork download
  1. // Double to 22!
  2. // Float to 13!
  3.  
  4. #include <stdio.h>
  5.  
  6. int main(void) {
  7. float p = 1.0;
  8. double q = 1.0;
  9. for (int i = 1; i <= 35; i++) {
  10. p *= i;
  11. q *= i;
  12. printf("%d, %.f, %.f\n", i, p, q);
  13. }
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
1, 1, 1
2, 2, 2
3, 6, 6
4, 24, 24
5, 120, 120
6, 720, 720
7, 5040, 5040
8, 40320, 40320
9, 362880, 362880
10, 3628800, 3628800
11, 39916800, 39916800
12, 479001600, 479001600
13, 6227020800, 6227020800
14, 87178289152, 87178291200
15, 1307674279936, 1307674368000
16, 20922788478976, 20922789888000
17, 355687414628352, 355687428096000
18, 6402373530419200, 6402373705728000
19, 121645096004222976, 121645100408832000
20, 2432902023163674624, 2432902008176640000
21, 51090940837169725440, 51090942171709440000
22, 1124000724806013026304, 1124000727777607680000
23, 25852017444594485559296, 25852016738884978212864
24, 620448454699064672387072, 620448401733239409999872
25, 15511211079246240657965056, 15511210043330986055303168
26, 403291499589617303175561216, 403291461126605650322784256
27, 10888870415132690890901946368, 10888869450418351940239884288
28, 304888371623715344945254498304, 304888344611713836734530715648
29, 8841763079319199907069674127360, 8841761993739700772720181510144
30, 265252889961724357982831874408448, 265252859812191032188804700045312
31, 8222839685527520666638122083155968, 8222838654177922430198509928972288
32, 263130869936880661332419906660990976, 263130836933693517766352317727113216
33, 8683318509846655538309012935952826368, 8683317618811885938715673895318323200
34, 295232822996533287161359432338880069632, 295232799039604119555149671006000381952
35, inf, 10333147966386144222209170348167175077888