Question: Code in Ocaml please, NOT assembly Write a function rightjustify : int -> int => string such that rightjustify w n returns a string representation

Code in Ocaml please, NOT assembly Write a function rightjustify : intCode in Ocaml please, NOT assembly

Write a function rightjustify : int -> int => string such that rightjustify w n returns a string representation of n padded with enough spaces in front so that the string has width W. (If the string representation of n has length greater than w, no padding should be added). So rightjustify 5 123 should evaluate to the string 123" and rightjustify 1 314 should evaluate to the string "314

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!