Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = 1
- b = 1
- 20.times do |n|
- a += a * 10
- b += b * 20
- puts "a #{a}. b #{b}. b/a #{b.to_f/a}"
- puts
- end
- __END__
- Output:
- a 11. b 21. b/a 1.90909090909091
- a 121. b 441. b/a 3.64462809917355
- a 1331. b 9261. b/a 6.95792637114951
- a 14641. b 194481. b/a 13.2833139812854
- a 161051. b 4084101. b/a 25.3590539642722
- a 1771561. b 85766121. b/a 48.4127393863378
- a 19487171. b 1801088541. b/a 92.4243206466449
- a 214358881. b 37822859361. b/a 176.446430325413
- a 2357947691. b 794280046581. b/a 336.852276075788
- a 25937424601. b 16679880978201. b/a 643.081617962869
- a 285311670611. b 350277500542221. b/a 1227.70127065639
- a 3138428376721. b 7355827511386641. b/a 2343.79333488946
- a 34522712143931. b 154472377739119461. b/a 4474.51454842534
- a 379749833583241. b 3243919932521508681. b/a 8542.25504699383
- a 4177248169415651. b 68122318582951682301. b/a 16307.9414533519
- a 45949729863572161. b 1430568690241985328321. b/a 31133.3427745808
- a 505447028499293771. b 30041942495081691894741. b/a 59436.3816605634
- a 5559917313492231481. b 630880792396715529789561. b/a 113469.455897439
- a 61159090448414546291. b 13248496640331026125580781. b/a 216623.506713293
- a 672749994932560009201. b 278218429446951548637196401. b/a 413553.967361741
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement