Anishluke92 / RubySolution

Problem solving using Ruby programming language
0 stars 1 forks source link

Read n characters #92

Open danielpaul opened 3 years ago

danielpaul commented 3 years ago

This problem was asked Microsoft.

Using a read7() method that returns 7 characters from a file, implement readN(n) which reads n characters.

For example, given a file with the content “Hello world”, three read7() returns “Hello w”, “orld” and then “”.