/gsoc_exercise_2

Second GSOC Exercise

Primary LanguagePHP

gsoc_exercise_2

Second GSOC Exercise

Questions

  1. Write a program that given the time of the day (hours, minutes) returns the angle between the hands on a clock. (outputs 0 because the hands are parallel.)

  2. Write a program that reverses a string in place (UX Tip: if spaces are included, remove them).

  3. Now write a routine that reverses each word in a string (words are characters separated by spaces)

  4. Write a program that will sort characters in a string in ascending or descending order. (UX Tip: if spaces are included, removethem)

  5. Write a program that will display all prime numbers from 1 - 500. (bonus: make the range customizable)

  6. If the above is recursive, make non recursive and vice versa.

  7. Write a program that will determine the second lowest and greatest numbers in an array.