clojure,ordinal,ordinals,ordinal-indicator
user=> (require '[clojure.pprint :as pprint]) nil user=> (map #(pprint/cl-format nil "~:R" %) [1 2 3 4 100]) ("first" "second" "third" "fourth" "one hundredth") note that :1 is not 1, and : is not a syntax for map keys user=> (pprint/pprint (into {} (map (fn [n] [n (pprint/cl-format nil "~:R" n)])...
wordpress,counter,ordinal,ordinals
You want to add the ordinal_suffix function from the other answer to your WordPress functions.php file so you can use it in your theme. Then you want to pass your $counter output to it. You'll want to change that line to: <div class="name"><?php echo ordinal_suffix($counter);?> <?php the_title();?></div> ...
In my opinion it would be better to move Scanner to main: public static void main(String[] args) { Ordinals number = new Ordinals(); Scanner input = new Scanner(System.in); while(true){ System.out.println("Enter an integer between 0 to 10: "); int i = input.nextInt(); System.out.println(i+number.Ordinals(i)); } } and then add to Ordinals: int...