#!/usr/bin/gawk # Challenge 123 # # TASK #1 > Ugly Numbers # Submitted by: Mohammad S Anwar # You are given an integer $n >= 1. # # Write a script to find the $nth element of Ugly Numbers. # # Ugly numbers are those number whose prime factors are 2, 3 or 5. For example, # the first 10 Ugly Numbers are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12. # # Example # Input: $n = 7 # Output: 8 # # Input: $n = 10 # Output: 12 function min(a, b) { return (a