• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to test Say 4b?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Any suggestions on how to do a decent test before sending in a solution for 4b? I think I am close to sending my first (of many I am sure ) attempts. I have tested it out with a bunch of random numbers, but it doesn't make me feel confident that this first attempt wouldn't be wasting a nitpickers time. Any suggestion other than testing all numbers between 0-999999999999? I figured others may have had the same problem before me.

Thanks,
Dez
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
a negative number
zero
a number from 1 and 9
ten
a number from 13 to 19
twenty
a multiple of 10 from 20 to 90
ninety nine
one hundred
a number from 101 to 109
a number from 113 to 119
one thousand something
one hundred thousand fifty
one billion
999,999,999,999
one trillion

java Say (no argument)

If it works for all these, it should pretty much work for any number I think.
 
This tiny ad is wafer thin:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic