text:
Sort the unique numbers in a multiplication table
Pretty simple challenge today:
Write a program or function that takes in a positive integer N and prints or returns a sorted list of the unique numbers that appear in the multiplication table whose row and column multiplicands both range from 1 to N inclusive.
The list may be sorted in ascending order (smallest to largest) or descending order (largest to smallest), and may be output in any reasonable format.
The shortest code in bytes wins!
Example
When N = 4, the multiplication table looks like:
   1  2  3  4
  -----------
1| 1  2  3  4
 |
2| 2  4  6  8
 |
3| 3  6  9 12
 |
4| 4  8 12 16

The unique numbers in the table are 1, 2, 3, 4, 6, 8, 9, 12, 16. These are already sorted, so
1, 2, 3, 4, 6, 8, 9, 12, 16

might be your exact output for N = 4. But since the sorting can be reversed and there's some leeway in the formatting, these would also be valid outputs:
[16,12,9,8,6,4,3,2,1]
1
2
3
4
6
8
9
12
16
16 12 9 8 4 3 2 1
Test Cases
N=1 -> [1]
N=2 -> [1, 2, 4]
N=3 -> [1, 2, 3, 4, 6, 9]
N=4 -> [1, 2, 3, 4, 6, 8, 9, 12, 16]
N=5 -> [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 20, 25]
N=6 -> [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 30, 36]
N=7 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 28, 30, 35, 36, 42, 49]
N=8 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 28, 30, 32, 35, 36, 40, 42, 48, 49, 56, 64]
N=9 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 54, 56, 63, 64, 72, 81]
N=10 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 70, 72, 80, 81, 90, 100]
N=11 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 49, 50, 54, 55, 56, 60, 63, 64, 66, 70, 72, 77, 80, 81, 88, 90, 99, 100, 110, 121]
N=12 -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 49, 50, 54, 55, 56, 60, 63, 64, 66, 70, 72, 77, 80, 81, 84, 88, 90, 96, 99, 100, 108, 110, 120, 121, 132, 144]

So basically, the code returns a list of numbers in the multiplication table specified by N, except any number cannot be repeated?

How big can N be?

@xsot You can assume N*N will be less than your language's maximum usual int value (probably 2^31-1)

So essentially this is 1-n and non primes up to n^2.

@gregsdennis No. There are plenty of composites not present. e.g. 91, 92, 93, 94, 95, 96 for N = 10.

Pyth, 8 bytes
S{*M^SQ2

Try it online.
Explanation: SQ takes the evaluated list input (Q) and makes a list [1, 2, ..., Q]. ^SQ2 takes the Cartesian product of that list with itself - all possible product combinations. *M multiplies all these pairs together to form all possible results in the multiplication table and S{ makes it unique and sorts it.

@FryAmTheEggman Input 5 already needs sorting, otherwise the 10 and 9 in the output are out of order.

darn keep on forgetting about that splatting on M. +1

Python 2, 61 51 bytes
lambda n:sorted({~(i%n)*~(i/n)for i in range(n*n)})

Thanks to xnor for shortening some syntax.

The set(...) can just be a set comp {...}. Also, functions are allowed by default here, so you can just write lambda n:....

Thanks for reminding me about set comprehension, I completely forgot it existed.

I can't see a better way to do this, best I see with recursion is 56: f=lambda n:n*[0]and sorted(set(range(n,n*n+n,n)+f(n-1))).

APL, 18 16 bytes
{y[⍋y←∪,∘.×⍨⍳⍵]}

This is an unnamed monadic function. The output is in ascending order.
Explanation:
             ⍳⍵]}   ⍝ Get the integers from 1 to the input
         ∘.×⍨       ⍝ Compute the outer product of this with itself
        ,           ⍝ Flatten into an array
       ∪            ⍝ Select unique elements
     y←             ⍝ Assign to y
 {y[⍋               ⍝ Sort ascending

Fixed an issue and saved 2 bytes thanks to Thomas Kwa!

Octave, 22 bytes
@(n)unique((a=1:n)'*a)

Julia, 24 bytes
n->sort(∪((x=1:n)*x'))

This is an anonymous function that accepts an integer and returns an integer array.
Ungolfed:
function f(n::Integer)
    # Construct a UnitRange from 1 to the input
    x = 1:n

    # Compute the outer product of x with itself
    o = x * transpose(x)

    # Get the unique elements, implicitly flattening
    # columnwise into an array
    u = unique(o)

    # Return the sorted output
    return sort(u)
end

CJam, 14 12 bytes
Latest version with improvements proposed by @aditsu:
{)2m*::*0^$}

This is an anonymous function. Try it online, with input/output code needed for testing it.
@Martin proposed another very elegant solution ({,:)_ff*:|$}) with the same length. I used the one by aditsu because it was much more similar to my original solution.
The main difference to my original solution is that this keeps the 0 value in the original sequence, which saves 2 bytes at the start. You'd think that this would not help, because you have to remove the 0 value from the result. But the core of @aditsu's idea is the 0^ at the end, which is a set difference with 0. This removes the 0, and at the same time, since it's a set operation, eliminates duplicate elements from the solution set. Since I already needed 2 bytes to eliminate the duplicates before, removing the 0 is then essentially free.
Explanation:
{     Start anonymous function.
  )     Increment to get N+1.
  2m*   Cartesian power, to get all pairs of numbers in range [0, N].
  ::*   Reduce all pairs with multiplication.
  0^    Remove 0, and remove duplicates at the same time since this is a set operation.
  $     Sort the list.
}     End anonymous function.

For the same length, {2m*::)::*_&$}, {)2m*::*_&$0-}

How about this for two bytes less :) {,:)_ff*:|$}

Another way: {)2m*::*0^$}

R, 39 bytes
cat(unique(sort(outer(n<-1:scan(),n))))

This reads an integer from STDIN and writes a space delimited list to STDOUT.
We create the multiplication table as a matrix using outer, implicitly flatten into a vector and sort using sort, select unique elements using unique, and print space delimited using cat.

35 bytes

MATLAB, 24 bytes
@(n)unique((1:n)'*(1:n))

Good one! Soon it will be possible to do it in 7 or 8 bytes... :-)

Oooh, nice! :-)

@Luis have you tried this one in MATL?

I don't have much time now to read the whole challenge, but seeing your Matlab code it looks like it could be done with MATL

Ruby, 50 48 bytes
->n{c=*r=1..n;r.map{|i|c|=r.map{|j|i*j}};c.sort}

Ungolfed:
->n {
  c=*r=1..n
  r.map { |i| c|=r.map{|j|i*j} }
  c.sort
}

Using nested loop to multiply each number with every other number upto n and then sorting the array.
50 bytes
->n{r=1..n;r.flat_map{|i|r.map{|j|i*j}}.uniq.sort}

Usage:
->n{c=*r=1..n;r.map{|i|c|=r.map{|j|i*j}};c.sort}[4]
=> [1, 2, 3, 4, 6, 8, 9, 12, 16]

zsh, 86 56 bytes
thanks to @Dennis for saving 30(!) bytes
(for a in {1..$1};for b in {1..$1};echo $[a*b])|sort -nu

Explanation / ungolfed:
(                      # begin subshell
  for a in {1..$1}     # loop through every pair of multiplicands
    for b in {1..$1}
      echo $[a*b]      # calculate a * b, output to stdout
) | sort -nu           # pipe output of subshell to `sort -nu', sorting
                       # numerically (-n) and removing duplicates (-u for uniq)

This doesn't work in Bash because Bash doesn't expand {1..$1}—it just interprets it literally (so, a=5; echo {1..$a} outputs {1..5} instead of 1 2 3 4 5).

I was waiting for a *sh answer. :D

Relevant bash tip. Seems to apply to the Z shell as well.

You can squeeze a bit more out of brace expansions

Shell + common utilities, 41
seq -f"seq -f%g*%%g $1" $1|sh|bc|sort -nu

Or alternatively:
Bash + coreutils, 48
eval printf '%s\\n' \$[{1..$1}*{1..$1}]|sort -nu

Constructs a brace expansion inside an arithmetic expansion:
\$[{1..n}*{1..n}] expands to the arithmetic expansions $[1*1] $[1*2] ... $[1*n] ... $[n*n] which are evaluated and passed to printf, which prints one per line, which is piped to sort.
Careful use of quotes, escapes and eval ensure the expansions happen in the required order.

Or alternatively:
Pure Bash, 60
eval a=($(eval echo [\$[{1..$1}*{1..$1}\]]=1))
echo ${!a[@]}

Husk, 6 bytes
OumΠπ2

Try it online!
Explanation
OumΠπ2
    π2  cartesian square
  mΠ    map product
 u      unique
O       sort

Haskell, 55 54 bytes
import Data.List
f n=sort$nub[x*y|x<-[1..n],y<-[1..x]]

Usage example: f 4 -> [1,2,3,4,6,8,9,12,16].
nub removes duplicate elements from a list.
Edit: @Zgarb found a superfluous $.

JavaScript (Node.js), 69 bytes
n=>[...a=Array(i=n*n)].map(x=>a[q=~(--i%n)*~(i/n)]=q)&&a.filter(x=>x)

Try it online!
JavaScript (Node.js), 76 bytes
n=>[...Array(n*n)].flatMap((_,i,x)=>x.every((_,j)=>~(j/n)*~(j%n)+~i)?[]:i+1)

Try it online!
No recursion like other answers

Mathematica, 25 bytes
Union@@Array[1##&,{#,#}]&

K, 17 bytes
t@<t:?,/t*\:t:1+!

Not much to say here. Sort (t@<t:) the unique items (?) of the flattened (,/) multiplied cartesian self-product (t*\:t:) of 1 up to and including N (1+!).
In action:
  t@<t:?,/t*\:t:1+!5
1 2 3 4 5 6 8 9 10 12 15 16 20 25

J, 21 20 bytes
Thanks to @Zgarb for -1 byte!
/:~@~.@,@(1*/~@:+i.)

My first J answer! Golfing tips are appreciated, if there is something to golf.
This is a monadic function; we take the outer product by multiplication of the list 1..input with itself, flatten, take unique elements, and sort.

Kotlin, 70 bytes
val a={i:Int->(1..i).flatMap{(1..i).map{j->it*j}}.distinct().sorted()}

Ungolfed version:
val a: (Int) -> List<Int> = {
    i -> (1..i).flatMap{ j -> (1..i).map{ k -> j * k } }.distinct().sorted()
}

Test it with:
fun main(args: Array<String>) {
    for(i in 1..12) {
        println(a(i))
    }
}

Jelly, 5 bytes
Ṭẋ)ST

Try it online!
  )      For each x in 1 .. n:
Ṭ        Create a list containing 1 at index x and 0s before it,
 ẋ       and repeat it x times.
   S     Sum the results element-wise,
    T    and yield the indices of non-zeros in the result.

Brachylog, 9 bytes
⟦₁⟨∋×∋⟩ᵘo

Try it online!
Explanation
⟦₁⟨∋×∋⟩ᵘo
⟦₁        Range from 1 to input number, inclusive
      ᵘ   Get all unique outputs of this predicate:
  ∋         Pick a number from that range
    ∋       Pick another number from that range
 ⟨ ×  ⟩      Multiply them together
       o  Sort the resulting list

Pyt, 7 bytes
řĐɐ*ƑỤş

Try it online!
ř           implicit input (n); push [1,2,...,n]
 Đ          duplicate
  ɐ*        generate multiplication table
    Ƒ       flatten array
     Ụ      get unique elements
      ş     sort in ascending order; implicit print

Thunno, \$ 12 \log_{256}(96) \approx \$ 9.88 bytes
R1+DZ!.PZU

Explanation
R1+DZ!.PZUz:  # Implicit input                    Example (n=5)
R1+           # [1..input]                        [1, 2, 3, 4, 5]
   DZ!        # Cartesian product with itself     [[1, 1], [1, 2], [1, 3], [1, 4], [1, 5], [2, 1], [2, 2], [2, 3], [2, 4], [2, 5], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5], [4, 1], [4, 2], [4, 3], [4, 4], [4, 5], [5, 1], [5, 2], [5, 3], [5, 4], [5, 5]]
      .P      # Product of each inner list        [1, 2, 3, 4, 5, 2, 4, 6, 8, 10, 3, 6, 9, 12, 15, 4, 8, 12, 16, 20, 5, 10, 15, 20, 25]
        ZU    # Uniquified                        [1, 2, 3, 4, 5, 6, 8, 10, 9, 12, 15, 16, 20, 25]
          z:  # And sorted                        [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 20, 25]
              # Implicit output

Screenshot

Vyxal, 7 bytes
ɾẊƛΠ;Us

Try it Online!

Try it Online! for 5 or 4.25 bytes

Minkolang 0.14, 25 22 18 bytes
I remembered that I very conveniently implemented Cartesian products before this question was posted!
1nLI20P[x*1R]sS$N.

Try it here. (Outputs in reverse order.)
Explanation
1                     Push a 1 onto the stack
 n                    Take number from input (n)
  L                   Pushes 1,2,...,n onto the stack
   I                  Pushes length of stack so 0P knows how many items to pop
    2                 Pushes 2 (the number of repeats)
     0P               Essentially does itertools.product(range(1,n+1), 2)
       [              Open for loop that repeats n^2 times (0P puts this on the stack)
        x             Dump (I know each product has exactly two numbers
         *            Multiply
          1R          Rotate 1 step to the right
            ]         Close for loop
             s        Sort
              S       Remove duplicates ("set")
               $N.    Output whole stack as numbers and stop.

Pyth, 10
S{m*Fd^SQ2

Try it Online or run a Test Suite

C, 96 bytes
i,a[1<<16];main(n){for(scanf("%d",&n);i<n*n;a[~(i%n)*~(i++/n)]="%d ");while(i)printf(a[i--],i);}

This prints the numbers in descending order. Suggestions are welcomed as this looks far from optimal.

TeaScript, 37 35 chars; 40 bytes
Saved 2 bytes thanks to @Downgoat
TeaScript is JavaScript for golfing.
(b+r(1,+x¬)ßam(z=>z*l±s`,`.u¡s»l-i)

Try it online!
Ungolfed and explanation
(b+r(1,+x+1)m(#am(z=>z*l)))s(',').u()s(#l-i)
              // Implicit: x = input number
r(1,+x+1)     // Generate a range of integers from 1 to x.
m(#           // Map each item "l" in this range "a" to:
 am(z=>       //  a, with each item "z" mapped to
  z*l))       //   z * l.
(b+      )    // Parse this as a string by adding it to an empty string.
s(',')        // Split the string at commas, flattening the list.
.u()          // Take only the unique items from the result.
s(#l-i)       // Sort by subtraction; the default sort sorts 10, 12, 100, etc. before 2.
              // Implicit: output last expression

You can just use r instead of A.r for generating ranges

Sure this is 35 bytes? I get 35 chars or 40 bytes.

@manatwork This would be 35 bytes in the ISO/IEC_8859-1 encoding format. But I'm not sure that TeaScript supports that encoding, so I'll change it to 40 bytes for now.

JavaScript (ES6), 92 90 bytes
n=>eval(`for(r=[],a=n;a;a--)for(b=n;b;)~r.indexOf(x=a*b--)||r.push(x);r.sort((a,b)=>a-b)`)

Explanation
n=>eval(`                 // use eval to remove need for return keyword
  for(r=[],a=n;a;a--)     // iterate for each number a
    for(b=n;b;)           // iterate for each number b
      ~r.indexOf(x=a*b--) // check if it is already in the list, x = value
      ||r.push(x);        // add the result
  r.sort((a,b)=>a-b)      // sort the results by ascending value
                          // implicit: return r
`)

Test

N = <input type="number" oninput="result.innerHTML=(

n=>eval(`for(r=[],a=n;a;a--)for(b=n;b;)~r.indexOf(x=a*b--)||r.push(x);r.sort((a,b)=>a-b)`)

)(+this.value)" />

Perl 6, 27 bytes
{squish sort 1..$_ X*1..$_} # 27
{unique sort 1..$_ X*1..$_} # 27
{sort unique 1..$_ X*1..$_} # 27

Example usage:
say {squish sort 1..$_ X*1..$_}(3); # (1 2 3 4 6 9)␤

my $code = {squish sort 1..$_ X*1..$_}

for 1..100 -> \N { say $code(N) }

my &code = $code;

say code 4; # (1 2 3 4 6 8 9 12 16)␤

Haskell, 51 bytes
f n=[i|i<-[1..n*n],elem i[a*b|a<-[1..n],b<-[1..n]]]

Pretty boring. Just filters the list [1..n*n] to the elements of the form a*b with a and b in [1..n]. Using filter gives the same length
f n=filter(`elem`[a*b|a<-[1..n],b<-[1..n]])[1..n*n]

I tried for a while to generate the list of products with something more clever like concatMap or mapM, but only got longer results. A more sophisticated check of membership came in at 52 bytes, 1 byte longer, but can perhaps be shortened.
f n=[k|k<-[1..n*n],any(\a->k`mod`a<1&&k<=n*a)[1..n]]

You can save 3 bytes by using (*)<$>..<*>.. like this

JAVA - 86 Bytes
Set a(int a){Set s=new TreeSet();for(;a>0;a--)for(int b=a;b>0;)s.add(a*b--);return s;}

Ungolfed
Set a(int a){
    Set s = new TreeSet();
    for (;a>0;a--){
        for(int b = a;b>0;){
            s.add(a*b--);
        }
    }
    return s;
}

Pyth, 11 bytes
S{sm*RdSdSQ

This is similar to the Julia answer. Thanks to @Maltysen

PHP, 74,73 70bytes
while($i++<$j=$n)while($j)$a[]=$i*$j--;$a=array_unique($a);sort($a);

print_r($a); // Not counted, but to verify the result

Ungolfed:
while($i++<$j=$n)
    while($j)
        $a[]=$i*$j--;

Previous:

while(($j=$i++)<$n)for(;$j++<$n;)$a[]=$i*$j;$a=array_unique($a);sort($a);

Not 100% sure what to do with output, but $a contains an array with the corresponding numbers. $n is the number geven via $_GET['n'], with register_globals=1

Python 3, 57 bytes
r=range(1,n+1);print(sorted({i*j for i in r for j in r}))

You're not outputting the result. Wrap the sorted with a print and it'll be fine

I thought that's OK since default behavior of Python CLI is outputting the last command. It's my first CodeGolf, too.

By the way, where is the print here: https://codegolf.stackexchange.com/a/65059/69669 ?

I know this is often confusing for new users but we allow functions as well as full programs. In that case, the line returns a function which can be used. However with what you had, the result wasn't going anywhere. We have a long meta discussion on it which can be found here: https://codegolf.meta.stackexchange.com/q/2447/32686

Also, I didn't notice the first time but you've got to do n=in(input()) or r=range(1,int(input())+1) because we don't allow snippets in general. I'm sorry for all this no-fun stuff :(

OK, no problem, thanks for explanation :) I should have read meta firstly, my bad.

Japt, 13 12 11 13 11 8 7 bytes
õ ï* Íâ

Try it
õ ï* Íâ     :Implicit input of integer U
õ           :Range [1,U]
  ï         :Cartesian product with itself
   *        :Reduce each pair by multiplication
     Í      :Sort
      â     :Deduplicate

Factor + math.matrices, 43 bytes
[ [1,b] dup outer [ ] gather natural-sort ]

Try it online!
Explanation
             ! 3
[1,b]        ! { 1 2 3 }
dup          ! { 1 2 3 } { 1 2 3 }
outer        ! { { 1 2 3 } { 2 4 6 } { 3 6 9 } }
[ ] gather   ! { 1 2 3 4 6 9 }
natural-sort ! { 1 2 3 4 6 9 }

Arturo, 52 bytes
$[n][sort unique flatten map 1..n'x->map x..n=>[x*]]

Try it

Thunno 2, 5 bytes
Ṗ€pUṠ

Try it online!
Explanation
Ṗ€pUṠ  # Implicit input
Ṗ      # Cartesian product
 €p    # Product of each
   U   # Uniquify the list
    Ṡ  # And sort it
       # Implicit output

Google Sheets, 52 bytes
=SORT(UNIQUE(TOCOL(MAKEARRAY(N,N,LAMBDA(i,j,i*j)))))

Python, 124 102 bytes
n=input()
l=[1]
for i in range(1,n+1):
 for j in range(1,n+1):l.append(i*j)
print sorted(list(set(l)))

More pythonic!

This is actually 123 bytes, not 124. But you can save a few bytes by using only a single space per indentation level rather than 4.

You can also put l.append(i*j) on the same line as the if conditional. I think it ends up being 102 bytes altogether.

And use += instead of append.

@El'endiaStarman edited, thanks!

One relatively minor issue: list(set(l)) is not guaranteed to be sorted.

@Calvin'sHobbies fixed (I think)

can't you use _ instead of n?

@anOKsquirrel i do not understand

JavaScript (ES6), 86 bytes
n=>{n++;a=[];for(j=1;j<n;j++)for(i=1;i<n;i++)if(a.indexOf(i*j)<0)a.push(i*j);return a}

Looking to shorten it (maybe will try nesting loops).

Perl 5, 91 bytes
for my $y (1 .. $ARGV[0]){
    map {$s{$n}++ unless($s{$n=$y*$_}) } ($y .. $ARGV[0])
}
print join(" ", sort {$a<=>$b} keys %s) . "\n";

to be run by passing the argument on the command line. It is quite a few declarations short of running with strictures and warnings.

Perl 5, 67 bytes
for$i(1..($n=pop)){$a{$_*$i}++for 1..$n}map say,sort{$a<=>$b}keys%a

Candy, 22 bytes
Input on stack
R0C(*=bA)bo(~Xe{|A?}x)

Long form:
range1
digit0
cart    # cartesian product of range0 and itself
while
  mult
  popA
  stack2
  pushA  # push products to second stack
endwhile
stack2
order
while    # loop to dedup
  peekA
  pushX
  equal
  if
    else
    pushA
    println
  endif
  XGetsA
endwhile

Perl 5, 83 bytes
Here's a perl version that doesn't do a sort, and doesn't require duplicate removal.  I'd like to claim that makes it faster, but it's running time is actually O(n^2.5)
$n=pop;for$i(1..$n*$n){for$j(1+int(($i-1)/$n)..sqrt($i)){if($i%$j==0){say$i;last}}}
A one-character longer and much slower version of this same approach reads as follows:
$n=pop;
for $i (1..$n*$n) {
  for $j (1..$i) {
    if ($i%$j == 0 && $i <= $n*$j && $i >=$ j*$j) {
      say $i;
      last
    }
  }
}

It works by traversing the multiplication table in a strictly ordered fashion.

Prolog (SWI), 94 bytes
As the output only had to be in a reasonable format I've chosen to save 7 bytes by returning the list (which displays it), rather than doing an explicit write.

Code:
p(N,S):-findall(O,between(1,N,O),M),findall(Z,(member(X,M),member(Y,M),Z is X*Y),L),sort(L,S).

Explained:
p(N,S):-findall(O,between(1,N,O),M),                      % Get a list of numbers between 1 and N.
        findall(Z,(member(X,M),member(Y,M),Z is X*Y),L),  % Create a list of the products of the different combinations of elements in the list of numbers between 1 and N.
        sort(L,S).                                        % Sort and remove doubles

Example:
p(6,L).
L = [1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 30, 36]

Try it out online here

Jelly, 6 bytes, language postdates challenge
×þµFṢQ

Try it online!
There are so many different ways to do this in 6 bytes that it feels like 5 might be possible. I haven't found a way, though.
Explanation
×þµFṢQ
×þ        Form multiplication (×) table (þ) up to the input
  µ       Fix a parsing ambiguity (µ in Jelly is like parentheses in C)
   F      Flatten the table into a single continuous list
    Ṣ     Sort the elements of the list
     Q    Take the unique elements of the sorted list

Swift, 146 137 133 87 bytes
var t={n in Set((1...n).map{i in(1...n).map{(i,$0)}}.joined().map{$0.0*$0.1}).sorted()}

To run, paste this into a playground or the REPL and call t(_:).
Here's an expanded version:
func table(n: Int) -> [[Int]] {
   let range = 1...n

   let combos = range.map { i in
      range.map { j in
         (i, j)
      }
   }.joined()

   let products = combos.map { combo in
      combo.0 * combo.1
   }

   let uniques = Set(products)
   let sorted = uniques.sorted()
   return sorted
}

Let's run through this step by step. We'll assume that n is 4.
First, we create a closed range containing all the numbers from 1 to n, inclusive. So, range is set to 1...4. (In the golfed version, it's more efficient to just create the range twice.)
Now we map over range twice, one map inside the other. This effectively creates a nested array containing every permutation of two numbers within the range 1...n. We then join these arrays to remove the nesting. For our example, this sets combos to
[
   (1, 1), (1, 2), (1, 3), (1, 4),
   (2, 1), (2, 2), (2, 3), (2, 4),
   (3, 1), (3, 2), (3, 3), (3, 4),
   (4, 1), (4, 2), (4, 3), (4, 4)
]

(In actuality, it's a FlattenSequence instead of an Array, but that doesn't matter for what we're going to do with it.)
Next, we map over combos, returning the results of multiplying each tuple's elements together. (Using tuples instead of more arrays saves 2 bytes due to the shorter element access syntax.) This sets products to
[
   1, 2, 3, 4,
   2, 4, 6, 8,
   3, 6, 9, 12,
   4, 8, 12, 16
]

We then create a Set from this array. Sets are unordered, and can only contain one of each item. This enables us to concisely remove duplicate products, at the cost of losing the order of the products. For all intents and purposes, this sets uniques to
[1, 2, 3, 4, 6, 8, 9, 12, 16].shuffled()

Finally, we call sorted() on uniques to get our ordering back, and return the result, which is
[1, 2, 3, 4, 6, 8, 9, 12, 16]

By default, sorted() does the same thing as sorted(by: <), which sorts in increasing order.

Kamilalisp, 29 bytes
⊼∘⊙∘∊∘[$(⌼ *) #0 #0]∘$(+ 1)∘⍳

Attempt This Online!

jq, 34 characters
[range(1;.+1)*range(1;.+1)]|unique

Sample run:
bash-5.2$ jq --compact-output '[range(1;.+1)*range(1;.+1)]|unique' <<< 5
[1,2,3,4,5,6,8,9,10,12,15,16,20,25]

(range() not generates array — “The numbers are produced as separate outputs.” Found no way to multiply a range's output by itself.)
Try it online!

Scala, 57 bytes
Golfed version. Attempt This Online!
n=>(1 to n).flatMap(i=>(1 to n).map(i*_)).distinct.sorted

Ungolfed version. Attempt This Online!
def f(n: Int): Array[Int] = {
    // Construct a Range from 1 to the input
    val x = 1 to n

    // Compute the outer product of x with itself
    val o = for {
      i <- x
      j <- x
    } yield i * j

    // Get the unique elements and sort them
    o.distinct.sorted.toArray
}

Perl 5 -a, 61 bytes
map{//;map$a{$'*$_}++,1.."@F"}1..$_;say for sort{$a-$b}keys%a

Try it online!


text:
The unique multiplication spiral
This one is inspired by Calvin's Hobbies recent multiplication table challenge.
Write a function or program that takes an integer N as input and prints or returns a N-by-N unique multiplication spiral. The code must (in theory) work for N between 0 and 1000 (outputting this can be hard though). The output should be equivalent to the table produced by the following procedure:

Fill out an N-by-N multiplication table. E.g. for N = 3:
1 2 3
2 4 6
3 6 9

Follow a spiral clockwise from the upper left corner, noting the numbers that you visit. When you visit a number which you have already visited, replace it with 0.

A few examples might make it more clear:
n = 0:
0

n = 1:
1

n = 2:       //   Spiral order:
1  2         //   1  2
0  4         //   4  3

n = 3:
1  2  3      //   1  2  3
0  4  6      //   8  9  4
0  0  9      //   7  6  5

n = 4:
1  2  3  4   //   1   2   3   4
0  0  6  8   //  12  13  14   5
0  0  9 12   //  11  16  15   6
0  0  0 16   //  10   9   8   7

n = 5:
1   2   3   4   5
0   0   6   8  10
0   0   9  12  15
0   0   0  16  20
0   0   0   0  25

n = 10:
1   2   3   4   5   6   7   8   9  10
0   0   0   0   0  12  14  16  18  20
0   0   0   0  15   0  21  24  27  30
0   0   0   0   0   0  28  32  36  40
0   0   0   0  25   0  35   0  45  50
0   0   0   0   0   0  42  48  54  60
0   0   0   0   0   0  49  56  63  70
0   0   0   0   0   0   0  64  72  80
0   0   0   0   0   0   0   0  81  90
0   0   0   0   0   0   0   0   0 100

The numbers are found like this:

Any reasonable output format is accepted, but it must be an N-by-N matrix, it cannot be just a list. Formats such the ones below are accepted, as there are N easily distinguishable 1-by-N columns, or N-by-1 rows:
[[1 2 3][0 4 6][0 0 9]]   <-- OK

[[1 0 0][2 4 0][3 6 9]]   <-- OK

ans =                     <-- OK
    1  2  3
    0  4  6
    0  0  9

Shortest code in bytes win.

I spy with my little eye a modified sieve of eratosthenes! I'm pretty sure there's a pattern you can use here that I've seen somewhere or another.

Why would there be an output for n=0 where there is no zero in the multiplication tables. I can understand n=1 would output 1, but why include zero?

@TomCarpenter, it might have been a bad decision, but I knew there would be a "What about N=0?"-question, so I made the N=0 -> 0 rule. In retrospect, it might have been better to say that N>0, but it's a bit too late now I'm afraid =/

@StewieGriffin You said that the output must be an N-by-N matrix, so the output for n=0 should be a 0-by-0 matrix, or the question would be inconsistent.

J, 22 bytes
,~$[:(*~:)[:,1*/~@:+i.

It output a 0-by-0 matrix for n=0.

Mathematica 123 122 117 98 92 73 bytes
With 24 bytes saved thanks to LegionMammal978 and another 19 by alephalpha !

Surprisingly, in this table, multiple instances of any whole number n will have the same relative ordering in the spiral as they do in the table itself!
The first appearance of a number n lies at the very cell where that number appears first in the table (when one fills in the table row by row).  This means that the approach can disregard the spiral constraint altogether, for it has no bearing on the outcome.  (See explanation below.)
ReplacePart[t=1##&~Array~{#,#},Join@@(Rest[t~Position~#]&/@Union@@t)->0]&

Example
ReplacePart[t=1##&~Array~{#,#},Join@@(Rest[t~Position~#]&/@Union@@t)->0]&[10]

{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, {0, 0, 0, 0, 0, 12, 14, 16, 18,
    20}, {0, 0, 0, 0, 15, 0, 21, 24, 27, 30}, {0, 0, 0, 0, 0, 0, 28, 32,
     36, 40}, {0, 0, 0, 0, 25, 0, 35, 0, 45, 50}, {0, 0, 0, 0, 0, 0, 42,
     48, 54, 60}, {0, 0, 0, 0, 0, 0, 49, 56, 63, 70}, {0, 0, 0, 0, 0, 0,
     0, 64, 72, 80}, {0, 0, 0, 0, 0, 0, 0, 0, 81, 90}, {0, 0, 0, 0, 0,
    0, 0, 0, 0, 100}}

Grid[%]

Explanation
We exploit the fact that the spiral-order of the positions of any digit, n, is the same as the the order of row-col positions returned by the function, Positions!
The location of the first occurrence of each number (whether one orders by the spiral or by the table position) will be the first element returned by Position.  That first-occurrence cell will be left as it is. The remaining instances of the number are replaced by 0.
Let's look at how this works, examining for the case of n==18. The idea is to start with the multiplication table:
(t = Table[k Range@#, {k, #}] &[10]) // Grid

and locate the row-col positions of each number.  For example, 18 is located at
Row 2, Col 9 (the first instance); Row 3, Col 6; Row 6, Col 3; and Row 9, Col 2.
These have the respective spiral-order positions {44, 58, 68, 82}.
Position[t, 18]

{{2, 9}, {3, 6}, {6, 3}, {9, 2}}

as the following table shows.

The final 3 instances of 18 need to be replaced by 0.  (We'll use a large bold blue zeros so they can be easily spotted.)
ReplacePart[%, {{3, 6}, {6, 3}, {9, 2}} -> Style[0, {Blue, Bold, 16}]]// Grid

Is there a reason for not writing a Function?

I was having trouble with nested pure functions, but this iteration doesn't require that. thanks.

I count 117 bytes excluding the newline.

Also, some more golfs

Some more golfs: ReplacePart[t=1##&~Array~{#,#},Join@@(Rest[t~Position~#]&/@Union@@t)->0]&

I'm surprised by how much you were able to save! Thanks.

MATLAB, 96 88 87 86 79 bytes
This is the 79 byte code, which follows the example outputs (for n=0 specifically)
n=input('');m=+(n>0);for i=1:n;a=i*(1:i);for j=a;m(m==j)=0;end;m(1:i,i)=a;end;m

This one is 75 bytes, has the same behaviour except for n=0 which will produce an empty array as per the implication of the question (N by N array = 0 by 0 = empty array).
n=input('');m=[];for i=1:n;a=i*(1:i);for j=a;m(m==j)=0;end;m(1:i,i)=a;end;m

This also works with Octave. You can try it online here. The code is already added as a file named 'multspiral.m'. So at the Octave prompt, type multspiral and press enter. You should then enter the size of the table (e.g. 4). The output will then be printed.

How does it work?
First this takes an input number as required (e.g. 6, 4, etc.)
n=input('');

Then we handle cases for n=0 and n=1 - these are given special treatment as they are two that don't follow the rule I am using for generating the arrays - in fact this could be 5 bytes shorter if not for the obscure n=0 case.
m=+(n>0);

Then for all values of n>2, we do some looping until the matrix is grown to the correct size.
for i=2:n;

There are actually only three simple differences between n and n+1 for all n>=2. These are:

A new column is added rightmost in the array which contains the numbers n(1:n). This is easily calculated with:
 a=i*(1:i);

Any elements which will be added in that new column must be removed from the existing matrix (set to zero) as they will always come later in the spiral than the new column. This is removed using a nestled for loop to set all elements in the current matrix which are in the new column to be zero.
for j=a;
    m(m==j)=0;
end;

There is a new row bottom most for which every element except that which is in the new column will be zero. When the new column added, because of the out of bounds indices that has been intentionally created are padded automatically with 0. One of MATLAB's strong features is that it can grow arrays without any special handling, so we can add the new row and column simply with:
m(1:i,i)=a;

Finally we have the end of the for loop - which once reached, the matrix m contains our output. As you are flexible with your output format, the matrix is shown by simply having m as a new line without a semicolon
end;
m

As an example, if we run the program, enter the number 10, we get the following output:
m =
     1     2     3     4     5     6     7     8     9    10
     0     0     0     0     0    12    14    16    18    20
     0     0     0     0    15     0    21    24    27    30
     0     0     0     0     0     0    28    32    36    40
     0     0     0     0    25     0    35     0    45    50
     0     0     0     0     0     0    42    48    54    60
     0     0     0     0     0     0    49    56    63    70
     0     0     0     0     0     0     0    64    72    80
     0     0     0     0     0     0     0     0    81    90
     0     0     0     0     0     0     0     0     0   100

Python, 99 95 90 89 87 81 bytes
Golfed code:
n=range(1,input()+1);m=[]
for x in n:l=[(x*y,0)[x*y in m]for y in n];m+=l;print l

Ungolfed:
n=range(1,input()+1);
m=[]
for x in n:
  l=[(x*y,0)[x*y in m]for y in n];
  m+=l;
  print l

Output:
10
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
[0, 0, 0, 0, 0, 12, 14, 16, 18, 20]
[0, 0, 0, 0, 15, 0, 21, 24, 27, 30]
[0, 0, 0, 0, 0, 0, 28, 32, 36, 40]
[0, 0, 0, 0, 25, 0, 35, 0, 45, 50]
[0, 0, 0, 0, 0, 0, 42, 48, 54, 60]
[0, 0, 0, 0, 0, 0, 49, 56, 63, 70]
[0, 0, 0, 0, 0, 0, 0, 64, 72, 80]
[0, 0, 0, 0, 0, 0, 0, 0, 81, 90]
[0, 0, 0, 0, 0, 0, 0, 0, 0, 100]

thanx @valuah for input byte shave

Haskell, 103 99 bytes
import Data.Lists
f 0=[[0]]
f n=chunksOf n$foldr(\c d->c:replace[c][0]d)[][a*b|a<-[1..n],b<-[1..n]]

Usage example: f 4-> [[1,2,3,4],[0,0,6,8],[0,0,9,12],[0,0,0,16]].
I've just discovered the Data.Lists module which has nice functions on lists (such as replace) and re-exports Data.List, Data.List.Split and Data.List.Extras.

Ruby, 67 63 61 bytes
->n{s,x=1..n,{};s.map{|c|s.map{|r|x[v=c*r]==1?0:(x[v]=1;v)}}}

63 bytes
->n{s,x=1..n,{};s.map{|c|s.map{|r|e=x[v=c*r]==1?0:v;x[v]=1;e}}}

67 bytes
->n{s,x=1..n,[];s.map{|c|s.map{|r|e=x.include?(v=c*r)?0:v;x<<v;e}}}

Usage:
->n{s,x=1..n,{};s.map{|c|s.map{|r|x[v=c*r]==1?0:(x[v]=1;v)}}}[10]
=> [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 0, 0, 0, 0, 12, 14, 16, 18, 20], [0, 0, 0, 0, 15, 0, 21, 24, 27, 30], [0, 0, 0, 0, 0, 0, 28, 32, 36, 40], [0, 0, 0, 0, 25, 0, 35, 0, 45, 50], [0, 0, 0, 0, 0, 0, 42, 48, 54, 60], [0, 0, 0, 0, 0, 0, 49, 56, 63, 70], [0, 0, 0, 0, 0, 0, 0, 64, 72, 80], [0, 0, 0, 0, 0, 0, 0, 0, 81, 90], [0, 0, 0, 0, 0, 0, 0, 0, 0, 100]]

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Running length of the movie in a human readable format
Whenever I search for the running length of a movie in IMDb, it is displayed in minutes. Immediately I would try to convert it into hour(s) and minute(s). It would be better if we could automate this.
Input:
150 min

Output:
2 hours 30 minutes

Input:
90 min

Output:
1 hour 30 minutes

Input:
61 min

Output:
1 hour 1 minute

Input:
60 min

Output:
1 hour 0 minute or 1 hour 0 minutes

Following are the conditions:

Input and Output should be in this exact format.
Input minutes will between 0 and 240.
Your answer can accept command line arguments or read input from the
user or a function.
Output should not be enclosed within quotes.
Output must be printed, not returned.

Leaderboard:

    var QUESTION_ID=65106,OVERRIDE_USER=16196;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/65106/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
    body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}#answer-list{padding-right: 100px}
     <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Result:
Its a tie between CJam and Pyth. Accepting CJam's answer as it was submitted before Pyth's 35 bytes code. However, please continue encouraging new submissions.

Must the answer be a complete program?

@quintopia According to site rules, no. You can use a function if you want to.

Technically, I (and I bet other humans) can read "150 minutes".

Why restrict to >59 minutes?  Also, I prefer 61 minutes to 1 hour 1 minute and really would hate seeing 1 hour 0 minutes

case sensitivity?

@markshancock You're right even I kept thinking about that. Check the updated question.

You changed the input range to be 0-240 but haven't included any test cases less than 60. I recommend sticking with the original range given that 28 answers have already been posted.

It appears you also changed the acceptable output for whole hours. Unless a challenge has blaring issues that need to be fixed, please do not make changes to a challenge that invalidate existing answers.

@markshancock Please don't suggest edits that break existing answers, re: x hours 0 minutes

@Sherlock, nothing wrong with expressing an opinion

I have reverted it back so existing answers won't get affected. I just felt all answers would be consistent i.e. one answer outputs 1 hour 0 minute and the other one like 1 hour 0 minutes.

@PyRulez Just to reduce additional effort :)

@sysreq It should be in the exact format as given in the test cases. So only lowercase letters.

@markshancock Ah yes. That's fair. Well, express away but also note if implementing that opinion would break existing answers. Thank you

@Sherlock, Wished my customers always knew exactly what they wanted and so I never had to change my code ... well, maybe not, they keep coming back.  ;)

@Sherlock, btw, if your code met the initial requirement. I'm sure people would understand you not making mods.

CJam, 39 35 bytes
ri60md]"hour minute"S/.{1$1>'s*+}S*

Try it online
Latest version includes improvements suggested by @MartinBüttner, particularly using the element-wise vector operator instead of transposing the two lists.
Explanation:
ri    Get input and convert to integer.
60md  Split into hours and minutes by calculating moddiv of input.
]     Wrap hours and minutes in a list.
"hour minute"
      String with units.
S/    Split it at spaces, giving ["hour" "minute"]
.{    Apply block element-wise to pair of vectors.
  1$    Copy number to top.
  1>    Check for greater than 1.
  's    Push 's.
  *     Multiply with comparison result, giving 's if greater 1, nothing otherwise.
  +     Concatenate optional 's with rest of string.
}     End block applied to both parts.
S*    Join with spaces.

35: ri60md]r"utehour"+6/W%.{1$1>'s*+}S* (Looks like this gives you a pretty solid lead on this challenge :))

@MartinBüttner r"utehour"+6/W% is actually the same length as "hour minute"S/, so that part ends up not helping. I think I had seen . used with a block before, but I had forgotten again that it was supported.

Ah, right, I had first posted a 36-byte version where it actually helped (but then deleted the comment and replaced it by the 35-byte version where it doesn't matter any more).

Python 3, 50 67 119 116 112 111 104 94 bytes
I'm not fond of going back to %-style string formatting, but it saves 6 bytes on .format.
Edit: Forgot to parse input.
Edit: Forgot to handle plurals.
Edit: Yay lambdas!
Edit: Added ungolfing
Edit: Darn it. Lambdas didn't help.
Edit: Since the minutes have maximum three digits, and int() doesn't mind spaces in the string, I can save a few bytes by using input()[:3].
i,j=divmod(int(input()[:3]),60);print(str(i),"hour"+("s"[:i!=1]),str(j),"minute"+("s"[:i!=1]))

Ungolfed:
string = input()[:3]
hours, minutes = divmod(int(string), 60)
a = string(div)
b = "hour" + ("s" if hours == 1 else "")
c = string(mod)
d = "minute" + ("s" if minutes == 1 else "")
print(a, b, c, d)

Ah! Increasing bytecount! +1 for not giving up ;-)

JavaScript, 78 bytes

n=>(h=(n=parseInt(n))/60|0)+` hour${h-1?"s":""} ${m=n%60} minute`+(m-1?"s":"")

Code:
<textarea id="textbox" style="margin-top:5px; margin-bottom:5px"></textarea>

Input:
<textarea id="inputbox" style="margin-top:5px; margin-bottom:5px"></textarea>
<button id="testbtn">Test!</button><button id="resetbtn">Reset</button>

Original Code Output:

New Code Output:

For the test suite, enter input like "61 min" into the input box.

Explanation
n=>                 //Define anonymous function w/ parameter n
(h=                 //start building the string to return with h, the # of hours
(n=parseInt(n))     //parse input for n
/60|0)+             //set h to floor(n / 60)
` hour              //add ' hour' to the string to return
${h-1?"s":""}       //add 's' to the string to return if h != 1, else add ''
                    //<--(a single space) add ' ' to the string to return
${m=n%60}           //set m, the # of miuntes, to n % 60, and add it to the string to return
 minute`+           //add ' minute' to the string to return
(m-1?"s":"")        //add 's' to the string to return if m != 1, else add ''
                    //implicitly return

Good one. Suggestion: reduce parseInt(n) to +n.

@nicael That doesn't work, I tried. :( It returns NaN. You can try to edit the code by using the test snippet I've provided in the answer if you want to see for yourself.

Ah, I got it: with parseInt(), you're not only parsing int but also removing 'min' from the string (forgot it also does the latter). Yeah, in this case my suggestion is invalid.

Input will not be just an integer. It fails when i provide input as 150 min.

@VasuAdari It's working for me, outputs 2 hours 30 minutes. May I ask how you tested it?

Sorry i entered wrongly :P. It works :)

Doesn't work... "Input is malformed. Using no input."

@ev3commander When using the test snippet, wrap the input in quotes so that it is recognized as a string. e.g. "61 min" or '61 min'

@ev3commander JavaScript ;)

+1 For JavaScript. Now you just have to make it a bookmarlet ;)

You forgot to specify that this is ES6

Pyth, 39 38 bytes
jd.iJ.Dv-zG60+Vc"hour minute")m*\s>d1J

Vitsy, 57 54 52 bytes
Oh, wow, I don't even have integers in my language. o-o
VVa6*Dv/D1M-D1m'ruoh 'Z' 'OVvM1m'etunim 'Z
N1-(['s']

VV                                      Capture the input as a final global
                                        variable, and push it again.
  a6*Dv/1M-                             Get floor(input/60), capturing 60 as a
                                        temp variable in the process.
           DN                           Duplicate and output it as a number.
             1-(['s']                   If it is only one, push 's'.

            'ruoh '                     Push ' hour'
                   Z                    Output everything.
                    ' 'O                Output a space.
V                                       Push the input.
 v                                      Get the temp variable (60).
  M                                     Modulo.
            N                           Output as a number.
             1-(['s']                   If it is only one, push 's'.

             'ruoh '                    Push ' hour'
                    Z                   Output everything.

Try it online!

Pyth, 46 bytes
jKdm++J.v+++hd:z03K60K+td*\s>J1c"/hour %minute

Takes input as x min and outputs x hours y minutes
Try it Here
Explanation:
   m~~~~~~~~~~~~~~~~~~~~~~~~~~~c"/hour %minute - map(func, "/hour %minute".split(" "))
            hd                                 - Get the first character of the string (/ or %)
              :z03                             - Get the first 3 characters of input
         +++      K60                          - Join them together and add a space and 60 to the end
      J.v                                      - Evaluate it and set result to J
                       td                      - Get all the characters of the string but the first (hour, minute)
                      +  *\s>J1                - If the result of the evaluated expression is less than 1, add an 's' character to the string
    ++               K                         - Join the results seperated with a space
jKd                                            - Join the 2 halves together with a space

K5, 55 51 bytes
" "/(" hour";" minute"){y,x,("s";"")1=.y}'$25 60\.*" "\

This is more general than it strictly has to be; might still golf it down further.
In action:
  f: " "/(" hour";" minute"){y,x,("s";"")1=.y}'$25 60\.*" "\;

  f'("61 min";"120 min";"150 min")
("1 hour 1 minute"
 "2 hours 0 minutes"
 "2 hours 30 minutes")

Edit:
This program went through several very different iterations in the course of development, and I thought that it might be more illuminating to show some of the intermediate steps.
Here was my first stab at the problem, before the pluralization requirement was introduced. There is clear repetition here:
{($_x%60)," hours ",($_60!x)," minutes"}@.*" "\

I realized that the general way to handle casting out of places was K5's "decode" form. To slot values into place in the string I used the "dot-apply" primitive, which applies an argument list to a function and unpacks the list into individual parameters:
{x," hours ",y," minutes"}.$25 60\.*" "\

Not much redundancy left here. When pluralization was added, I decomposed that leading anonymous function into a transformation I could apply to each number, like this:
{x,y,("s";"")1=.x}

Join x, y, and either s or nothing, depending on whether x is equal to "1". Ultimately it worked better to reverse the order of the arguments to this function.
Edit 2:
" "/(" hour";" minute"){y,x,("s";"")1=.y}'$25 60\.*" "\
" "/(" hour";" minute"){y,x,(~1=.y)#"s"}'$5 60\.-4_

Several small improvements here. A better way of selecting an "s" or an empty string, a shorter constant for "decode" which reflects the limited range of input, and a simpler way of discarding "min".

JavaScript (ES6), 100 94 89 81  bytes
t=>(h=0|(t=parseInt(t))/60)+' hour'+(h>1?'s ':' ')+t%60+' minute'+(t%60>1?'s':'')

De-golfed demo (converted to ES5, as not all the browsers support ES6 yet)

function s(t) {
  return (h = 0 | (t = parseInt(t)) / 60) + ' hour' + (h > 1 ? 's ' : ' ') + t % 60 + ' minute' + (t % 60 > 1 ? 's' : '');
}

alert(s(prompt()))

You could wrap t=parseInt(t) and parenthesis, and then put that where ever you first use t so: (h=0|(t=parseInt(t))/60). This way, you can remove the return and the {}

@Downgoat I've already tried but it didn't work for some reason. Will try again.

@Downgoat Apparently I've made a mistake previously, now it works properly. Thanks :)

USE TEMPLATE STRINGS. ${}!!!

Perl 6, 80 73 bytes
80 byte original
{my$h=$_ div 60;my$m=$_%60;"$h hour{'s'x?($h-1)}"~" $m minute{'s'x?($m-1)}"x?$m}

Usage:
.say for (150,90,61,60).map:
  {my$h=$_ div 60;my$m=$_%60;"$h hour{'s'x?($h-1)}"~" $m minute{'s'x?($m-1)}"x?$m}

2 hours 30 minutes
1 hour 30 minutes
1 hour 1 minute
1 hour

Due to a change in the question I can remove x?$m from the end of the function, which allows me to reduce it by 3 more bytes.
{my$h=$_ div 60;my$m=$_%60;"$h hour{'s'x?($h-1)} $m minute{'s'x?($m-1)}"}

2 hours 30 minutes
1 hour 30 minutes
1 hour 1 minute
1 hour 0 minutes

C#, 127 bytes
var i=int.Parse(Console.ReadLine().Split(' ')[0]);Console.Write(i/60+" hour"+(i/60>1?"s ":" ")+i%60+" minute"+(i%60>1?"s":""));

This can be put in a file and run via the C# interactive shell that comes with Mono, using the default configuration.
[This is my first attempt at code golf. I hope that my contribution is not violating any rules.]

C, 89 bytes
main(n){scanf("%d",&n);printf("%d hour%s %d minute%s",n/60,"s"+119/n,n%60,"s"+(n%60<2));}

Please specify environment, on gcc 44 min => 0 hour%d hour%s %d minute%s 44 minutes

Ruby, 75 bytes
a,b=gets.to_i.divmod 60;$><<"#{a} hour#{a>1??s:''} #{b} minute#{b>1??s:''}"

Sometimes even an empty string is too long. '' → p.

MATLAB, 111 108 106 bytes
i=sscanf(input(''),'%d');h=fix(i/60);m=i-h*60;fprintf('%d hour%c %d minute%c\n',h,'s'*(h~=1),m,'s'*(m~=1))

This also works with Octave, and can be tried here. The link is to a workspace already containing the code in a file named runningLength.m. So to test it out simply enter runningLength at the prompt, then enter the input string, e.g. '123 mins' and it will display the output.
Takes the input as a string, e.g. '123 mins', converts it to a number (which implicitly ignores the mins bit).
i=sscanf(input(''),'%d');

Minutes and hours are then calculated
h=fix(i/60);m=i-h*60;

Then displays the output string
fprintf('%d hour%c %d minute%c',h,'s'*(h~=1),m,'s'*(m~=1));

The 's' bit of the output is calculated and handled correctly - an 's' is added whenever the number is not 1.

Haskell, 117 109 bytes
f x|(d,m)<-divMod(read$take 3 x)60=putStr$u[d#"hour",m#"minute"];u=unwords;1#q=u["1",q];p#q=u[show p,q++"s"]

Less golfed version:
f :: String -> IO ()
f x = putStr (unwords [(n`div`60)#"hour",(n`mod`60)#"minute"])
  where
  n :: Int
  n = take 3 (read x)

  (#) :: Int -> String -> String
  1#q = unwords ["1",q]
  p#q = unwords [show p,q++"s"]

f is  a function which takes the first 3 characters of its input and converts them to an integer.
p#q is a function which pluralises q if p is not equal to 1. In order to return the result without surrounding quotes, I used putStr to print the result to STDOUT.
Thanks to nimi for the help!

Python 2, 79 77 bytes
m=int(raw_input()[:3])
print m/60,"hours"[:4+m/120],m%60,"minutes"[:6+m/2%30]

The first 3 characters of the input are simply parsed as an integer. This only works because the third character in a 2 digit input is a space, which int will ignore during conversion.

I think you can just do "hour"+m/120*"s" and likewise for minutes.

It'll fail for m=240, unfortunately.

R, 112 bytes
Edit: Fixed a scoping error and then addressed the quotation output issue.
g=function(x){h=floor(x/60);m=x%%60;cat(paste(h,ifelse(h==1,"hour","hours"),m,ifelse(m==1,"minute","minutes")))}

Test cases
> g(150)
2 hours 30 minutes
> g(90)
1 hour 30 minutes
> g(61)
1 hour 1 minute
> g(60)
1 hour 0 minutes

I tried to save space by trying to find a way to just add or subtract "s" as necessary but I had to mess with the sep = argument in the paste() function and it didn't really seem like it was going to save me very much space. Any suggestions?
Ungolfed
g=function(x){
    h=floor(x/60);
    m=x%%60;
    cat(paste(h,
              ifelse(h==1,"hour","hours"),
              m,
              ifelse(m==1,"minute","minutes")))
}

Rounding down with input/60 or input%%60 (mod) gives the hours and minutes respectively. Chain them together with an ifelse() statement that specifies whether or not the units are hour(s) or minute(s).

Output should not be enclosed within quotes.

@Vasu Adari Fixed it using the cat() function.

You can save bytes by handling plural with just  s  and by changing your conditions.

Haskell, 107 101 bytes
g=putStr.f.read.take 3;s!1='1':s;s!n=show n++s++"s";f x|(a,b)<-divMod x 60=" hour"!a++' ':" minute"!b

Ungolfed:
g :: String -> String
g = putStr . f . read . take 3
  where
    (!) :: String -> Int -> String
    s!1 = '1':s
    s!n = show n++s++"s"

    f :: Int -> String;
    f x
      | (a,b) <- divMod x 60 = " hour"!a ++ ' ':(" minute"!b)

s!n prepends n to s, adding a 's' to the end if n /= 1.
f x does the formatting after using divMod.
Since we can assume a max input of 240, take 3 is sufficient to take only the number.
(Had to try really hard to beat @Craig Roy's score...)

LabVIEW, 50 Bytes
This is counted according to my suggestion on Meta.
The code is pretty straight forward, take number from input Modulo by 60 and add an s for minutes != 1. Other side of case just puts the string through.

Scala, 135 bytes
var a=(i:String)=>{var (v,b)=(i.split(" ")(0).toInt,(i:Int)=>if(i<2)""else"s");printf(v/60+" hour"+b(v/60)+" "+v%60+" minute"+b(v%60))}

Usage:
a("120 min")
2 hours 0 minute

Python 2, 96 bytes
i=int(raw_input().split()[0])
print"%d hour%s %d minute%s"%(i/60,"s"*(i>120),i%60,"s"*(i%60!=1))

This doesn't appear to correctly handle plurals.

@Doorknob This is what happens when the rules get changed after answers are posted :)

Python, 152 bytes
Sorry, fixed the code so it handles the input/output the way the insturctions say.
 def t(p):
  import math
  print(str(math.floor(p/60))+" hour" + ("s " if math.floor(p/60>1) else " ") +str(p%60)+" minute" + ("s " if p%60>1 else ""))

Edit:
 Why is the still -1 with the edited code? It works exactly how the OP asks.

You don't need the comma or the period. c:

Also, I think that round also has a chance of going up, making 239 be 4 hours and 59 minutes.

@Mego yeah I noticed that. I will fix this as soon as possible. On mobile right now

from math import* will save you bytes

Do you really need those spaces in between?

@VasuAdari no I don't. I thought I fixed that but it looks like the edit never saved. Thanks.

You still have some space before and after +. Is that really needed?

@VasuAdari yeah I know thanks. Sorry, when I went back and did it I was in a rush. Honestly, don't have much time for golfing during weekdays, on the weekend il go back and fix it.

Ruby, 97 100 99 88 bytes
Edit: Fixing output.
Edit: Removing braces from divmod.
Edit: Yay string interpolation! Thanks to Vasu Adari. Also, better ungolfing.
i,j=gets.split[0].to_i.divmod 60;puts"#{i} hour#{i==1?"":"s"} #{j} minute#{j==1?"":"s"}"

Ungolfed:
input = gets                            Input
number = input.split[0].to_i            Get number, convert to int
hours, minutes = number.divmod 60       hours == s / 60, minutes == s % 60
result = hours.to_s+" hour"             Start with the hours
result += {hours == 1 ? "" : "s"}       Put in the first "s" if plural
result += minutes.to_s+" minute"        Add the minutes
result += {minutes == 1 ? "" : "s"}     Put in the second "s" if plural
puts result                             Output

o/p should not be enclosed within quotes.

@VasuAdari Fixed

You can lose the braces for divmod method. Also by using string interpolation you can save few bytes.

@VasuAdari I am aware of that string iterpolation is a thing, but I'm not sure what it is or how it works. Thanks for the help

@VasuAdari Oop, wait. Google has taught me what I need to know. Let me get editing.

Mathematica, 61 bytes
Print@ToString[Quantity@#~UnitConvert~MixedRadix["h","min"]]&

Go, 177 Bytes
(It includes only the function and the import  statements)
import("fmt";c"strconv";t"strings")
func f(s string){p,_:=c.Atoi(t.Split(s," ")[0]);t:=fmt.Printf;h:=p/60;m:=p%60;t("%d Hour",h);if h>1{t("s")};t(" %d Minute",m);if m>1{t("s")}}

Pretty solution -
func f(s string) {
    p, _ := c.Atoi(t.Split(s, " ")[0])
    t := fmt.Printf
    h := p / 60;m := p % 60
    t("%d Hour", h)
    if h > 1 {
        t("s")
    }
    t(" %d Minute", m)
    if m > 1 {
        t("s")
    }
}

Testing it -
func main() {
    ip_list := []string{
        "120 min",
        "150 min",
        "60 min",
    }

    for _, ip_val := range ip_list {
        f(ip_val)
        fmt.Println("")
    }
}

/* OUTPUT
2 Hours 0 Minute
2 Hours 30 Minutes
1 Hour 0 Minute
*/

Seriously, 77 bytes
ε" min",Æ≈;:60:@\@:60:@%'sε(;)1≥I"%d hour"+(#@%'sε(;)1≥I"%d minute"+(#@%@k' j

Seriously is seriously not good at string manipulation. Try it online with full explanation (you will need to manually enter the input like "210 mins" because permalinks don't like quotes).
Quick and dirty explanation:
ε" min",Æ≈            get input, replace " min" with the empty string, convert to int
;:60:@\@:60:@%        calculate divmod
'sε(;)1≥I"%d hour"+   push "%d hour" or "%d hours", depending on whether pluralization is needed
(#@%                  format "%d hour(s)" with the # of hours calculated earlier
'sε(;)1≥I"%d minute"+ same as above, but with minutes
(#@%                  same as above, but with minutes
@k' j                 swap the order and join with a space to get "X hour(s) X minute(s)"

Your link does not work

Ruby, 74 73 71 bytes
->i{puts"#{i=i.to_i;h=i/60} hour#{h>1??s:''} #{m=i%60} minute#{m>1??s:''}"}

73 bytes
->i{puts"#{h,m=i.to_i.divmod 60;h} hour#{h>1??s:''} #{m} minute#{m>1??s:''}"}

74 bytes:
->i{h,m=i.to_i.divmod 60;puts "#{h} hour#{h>1??s:''} #{m} minute#{m>1??s:''}"}

Usage:
->i{puts"#{i=i.to_i;h=i/60} hour#{h>1??s:''} #{m=i%60} minute#{m>1??s:''}"}[61]

1 hour 1 minute

PHP, 77 76 bytes
$m=($i=$argv[1])%60;echo$h=$i/60|0," hour","s"[$h<2]," $m minute","s"[$m<2];

horible, horible, horible!
PHP only issues a couple of Notices for "s"[$h<2]
To run: php -r 'CODE' '150 minutes'
and of course turn error reporting off/away from stdout!
Edit: -1byte assign in assign (credit: insertusernamehere)
It's so ugly I must give a run helper for linux users:
php -c /usr/share/php5/php.ini-production.cli -r 'CODE' '61 min'

1 byte less: $m=($i=$argv[1])%60;echo$h=$i/60|0," hour","s"[$h<2]," $m minute","s"[$m<2];.

@insertusernamehere nice, thanks! crazy

You're welcome. Even 4 bytes lesser (was too tired to notice yesterday): $m=($i=$argv[1])%60;echo$h=$i/60|0," hour",s[$h<2]," $m minute",s[$m<2];.

@insertusernamehere that's a really nasty old one, but can't believe it works for php 5.6-7 and not for 5.3-5.5

I've tested it with PHP 5.6.10 (OS X) and it works here. :)

AutoHotkey, 174 170 160 bytes
x::Send,% !i?"x" i:=SubStr(clipboard,1,(Clipboard~="\s")):"{Backspace "StrLen(i)"}" i//60 " Hour"(i//60!=1?"s ":" ")Mod(i,60)" Minute"(Mod(i,60)!=1?"s":"")i:=""

Notes:

Input from Clipboard
Output prints to any form by pressing x
Correctly handles plurals
Could be smaller but I wanted a provide a One Liner.

Go, 168 132 127 120 121 120 115 bytes
Try it here!
Even with minification, I'm still being beaten by Java ): finally beating Java!
note: there's nothing in the spec about plurals nor excluding 0 minutes, so my program ignores such cases.
integer math in Go always returns an integer, thus this is straightforward.
package main
import(."fmt"."strconv")
func main(){a:=""
Scanln(&a)
x,_:=Atoi(a)
Printf((x/60),"hrs",(x%60),"mins")}
Ungolfed
package main

import (
    . "fmt"
    . "strconv"
)

func main() {
    a := ""
    Scanln(&a)
    x, _ := Atoi(a)
    Println((x / 60), "hrs", (x % 60), "mins")
}

Arcyóu (non-competitive), 93 bytes
This submission uses a version of the language that was created after this challenge.
(: x(#((v(l))0)))(: h(#/ x 60))(: m(% x 60))(% "%d hour%s %d minute%s"(' h(* s([ h))m(* s([ m

Yeesh! This language needs better string manipulation.
Explanation:
(: x              ; Set x
  (#              ; Cast to int
    ((v (l)) 0))) ; First element of input split on spaces
(: h (#/ x 60))   ; Set h to the hours
(: m (% x 60))    ; Set m to the minutes
(%                ; String format
  "%d hour%s %d minute%s"
  ('              ; List
    h             ; Hours
    (* s([ h))    ; Evaluates to 's' if h is not 1
    m             ; Minutes
    (* s([ m      ; Evaluates to 's' is m is not 1

Kotlin, 132 bytes
val m={s:String->val j=s.split(" ")[0].toInt();print("${j/60} hour${if(j/60==1)"" else "s"} ${j%60} minute"+if(j%60==1)"" else "s")}

Ungolfed Version:
val m = { s: String ->
    val j = s.split(" ")[0].toInt();
    print("${j / 60} hour${if(j / 60 == 1) "" else "s"} ${j % 60} minute" + if(j % 60 == 1) "" else "s")
}

Test it with:
fun main(args: Array<String>) {
    for(i in arrayOf(150, 90, 61, 60)) {
        m("$i min")
        println()
    }
}

Example outputs:
2 hours 30 minutes
1 hour 30 minutes
1 hour 1 minute
1 hour 0 minutes

Welcome to PPCG.SE! I have edited your post to make is look more aesthetically pleasing. Have fun!

Java 8, 148 Bytes
interface S{static void main(String[]b){int a=new Integer(b[0]),h=a/60,m=a%60;System.out.printf(h+" hour%s "+m+" minute%s",h>1?"s":"",m>1?"s":"");}}

I chose to post an alternative to @TheAustralianBirdEatingLouse as this is not only shorter by a good deal (~10%) but also more correct in printing hour(s) and minutes(s) instead of abbreviated hrs and mins. Method implementations in Interfaces are new to Java 8 - so this would be needed to compile/run

PHP, 110 100 96 bytes
$t=$argv[1];$h=intval($t/60);$m=$t-$h*60;echo"$h hour".($h>1?"s":"")." $m minute".($m>1?"s":"");

You can run it using php -r
GET parameters are no longer allowed(meta.codegolf.stackexchange.com/a/7591/14732 and meta.codegolf.stackexchange.com/q/7575/14732)

You can save bytes by just having hour and minute string and checking just for s.

@VasuAdari saved 10 bytes thanks to you.

You're welcome. One doubt, can you not do $h,$m=1,2 or [1,2] in php?

Unfortunately no. But I'm not aware if there's a similar way.

Java - 143 141 139 bytes
Since functions are allowed, here is my take
void a(String a){int b=Integer.valueOf(a.split(" ")[0]),c=b/60,d=b%60;System.out.print(c+" hour"+(c>1?"s ":" ")+d+" minute"+(d>1?"s":""));}

Ungolfed
void a(String a){
    int b=Integer.valueOf(a.split(" ")[0]),c=b/60,d=b%60;
    System.out.print(
            c+" hour"+(c>1?"s ":" ")+
            d+" minute"+(d>1?"s":"")
            );
}

Input
a("59 mins");
a("121 mins");
a("239 mins");

Output
0 hour 59 minutes
2 hours 1 minute
3 hours 59 minutes

Mumps, 81 Bytes
R U S M=+U#60,H=+U\60 W H," hour",$S(H=1:" ",1:"s "),M," minute",$S(M=1:"",1:"s")

Ungolfed:
R U                 ; (R)ead from standard input
S M=+U#60,H=+U\60   ; S(et) M to integer (mod) Minutes and H to integer Hours
W H," hour",$S(H=1:" ",1:"s "),M," minute",$S(M=1:"",1:"s")
                    ; W(rite) H & hour, if H doesn't equal 1 pluralize;
                    ; same for M & minute(s).

Sorry for the initial submission - the formatting on my ungolfed wasn't quite right and I didn't realize at first that hitting 'tab' then 'space' in the editor window equated to "submit." :-)

Prolog, 134 bytes
Code:
p(X):-sub_atom(X,0,_,4,S),atom_number(S,N),divmod(N,60,Q,R),(Q>1->I=s;I=""),(R=1->J="";J=s),writef('%w hour%w %w minute%w',[Q,I,R,J]).

Explanation:
p(X):-sub_atom(X,0,_,4,S),                       % Remove last 4 chars from input
      atom_number(S,N),                          % Convert to integer
      divmod(N,60,Q,R),                          % Split minutes into hours/minutes
      (Q>1->I=s;I=""),(R=1->J="";J=s),           % Check if hours/minutes are plural
      writef('%w hour%w %w minute%w',[Q,I,R,J]). % Print

Example:
p('150 min').
2 hours 30 minutes

Pyth, 35 bytes
jds.b,N+WtNY\s.Ds-zG60c"hour minute

Try it online: Demonstration or Test Suite
Explanation:
jds.b,N+WtNY\s.Ds-zG60c"hour minute  implicit: z = input string
                 -zG                 remove all letters from the string
                s                    and convert it (gives us the number)
              .D    60               gives [quotient, remainder] (division by 60)
                      c"hour minute  split "hour minute"
   .b                                map each pair (number N, string Y) to:
     ,                                  the pair
      N                                 [ N,
       +WtNY\s                               Y + "s" if N-1 ]
  s                                  join the two pairs
jd                                   join strings by spaces

awk, 72 bytes
{printf"%d hour%s %d minute%s\n",h=$1/60,h~/^1/?_:"s",m=$1%60,1~m?_:"s"}

Basically just a printf, taking advantage of awks ability to compare numbers using regexp.
input/output examples

0 min
0 hours 0 minutes
1 min
0 hours 1 minute
60 min
1 hour 0 minutes
61 min
1 hour 1 minute
121 min
2 hours 1 minute
122 min
2 hours 2 minutes

Thunno 2 Ṡ, 29 bytes
OhN60ḋDð‘ƝḢ Ạẋ‘O+ZıẸs1>'s×+;Z

Try it online!
Explanation
O          # Split on spaces
 hN        # Take the first item and convert to integer
   60ḋ     # Divmod by 60
      Dð   # Duplicate and push a space
‘ƝḢ Ạẋ‘    # Push compressed string "hour minute"
       O   # Split it on spaces
        +  # And prepend the space to each one
Z          # Zip it with the divmod list
 ı         # And map over this list of pairs:
  Ẹ        #  Dump onto the stack
   s       #  Swap so the number is on top
    1>     #  Is it greater than 1?
's        '#  Push the character "s"
  ×        #  Multiply by our boolean value
   +       #  Add to the string
    ;Z     # After the map, zip with the divmod list
           # Implicit output, joined by spaces

Julia, 110 99 93 bytes
x->((h,m)=divrem(parse(x[1:end-4]),60);print("$h hour$(h>1?"s":"") $m minute$(m>1?"s":"")"))

This is an anonymous function that accepts a string and prints to STDOUT.
Ungolfed:
function f(x::AbstractString)
    # Parse the number of minutes out of the input
    y = parse(x[1:end-4])

    # Get the number of hours and minutes
    h, m = divrem(y, 60)

    # Construct the output using string interpolation
    print("$h hour$(h>1?"s":"") $m minute$(m>1?"s":"")")
end

C++, 175 bytes
#include<iostream>
using namespace std;main(int argc,char**argv){int a=stoi(argv[1]);cout<<a/60<<" hour";if(a/60!=1)cout<<"s";cout<<" "<<a%60<<" minute";if(a%60!=1)cout<<"s";}

Ungolfed:
#include <iostream>
using namespace std;
main(int argc, char **argv)
{
   int a = stoi(argv[1]);
   cout << a / 60 << " hour";
   if(a / 60 != 1) cout << "s";
   cout << " " << a % 60 << " minute";
   if(a % 60 != 1) cout << "s";
}

Probably the only time that std::stoi truncating non-number characters will ever be useful, but it's enough to put C++ ahead of C, I think.

You can save 2 bytes by changing !=1 to >1.

Java, 107 192 160 149 129 172 162 129 bytes
So, here's my solution:
void b(String[]a){int a=Integer.valueOf(a[0]);System.out.print(a/60>1?a/60+" hrs ":a/60+" hr "+a%60>1?a%60+" mins":a%60+" min");}

It uses command-line input, and works like this:
Java command example: javac MovieTime 108 minutes
Input: 108 minutes
Output: 1 hr 48 mins
Changes:

Changed the code to full class, adding 85 bytes
Got rid of unnecessary whitespaces, subtracting 32 bytes
Made variable/class names shorter, subtracting 11 bytes
Made Integer.valueOf(args[0]) into a variable and changed println into print, subtracting 20 bytes
Added system for changing plurals of times, adding 43 bytes
Made times shorter, subtracting 10 bytes
Code is now a function instead of a class, subtracting 33 bytes

Any ideas as to how I can shorten it would be greatly appreciated, as this is my
 first golf submission.

Now get rid of all of that unnecessary whitespace around operators and braces.

And make the class name one character, and replace String[] args with String[]a.

You can also assign Integer.valueOf(args[0]) to a variable.

@ThomasKwa wouldn't that increase the size due to declaration?

no; int a= and ; takes 7 bytes, and you use it twice for a total of 9 bytes. Integer.valueOf(args[0]) takes 26 bytes. Unless there's a shorter way to convert to int; I don't golf in Java.

You can also change println to print.

This doesn't use the singular/plural form of "hour(s)" and "minute(s)" depending on the number. Your test example should output 1 hour 48 minutes (singular "hour").

@RetoKoradi Is that part necessary?

Absolutely. Handling that with as little code as possible is the most interesting part of this challenge. You can see that if you look at the other solutions.

I've added that in, so I believe I've got a final byte count of 162

You can make it a function, not necessarely a program...

@YassinHajaj Thank you, I did not realize that

Where does it say you can use "hrs" and "mins" instead of the actually specified "hours" and "minutes"?

If you can, then so shall I.

I don't think it matters, no one's told me anything and it does't specify in the OP you can't.

VBA, 175 bytes
Sub e(f)
f = Val(f)
h = Int(f / 60)
m = f - h * 60
MsgBox IIf(h > 0, h & " hour" & IIf(h > 1, "s", ""), "") & " " & IIf(m > 0, m & " minute" & IIf(m > 1, "s", ""), "")
End Sub

Python 2, 102 bytes
a=int(raw_input().split()[0]);h=a/60;m=a%60;l="s\0";print"%s hour%s %s minute%s"%(h,l[h==1],m,l[m==1])

Python 2: 56 bytes
Golfed code
m=int(raw_input()[:3]);print m/60,'hours',m%60,'minutes'

Readable code
# get input from STDIN
string_input = raw_input()
# parse number of minutes in the first three characters
minutes_input = string_input[:3]
# compute number of hours and remaining minutes
hours = minutes_input / 60
minutes = minutes_input % 60
# display result
print hours, 'hours', minutes, 'minutes'

Try it online
https://ideone.com/HdTKRt

Python 2: 80 bytes (with plurals handling)
Golfed code
_,m='\0s',int(raw_input()[:3]);print m/60,'hour'+_[m>60],m%60,'minute'+_[m%60>1]

Try it online
https://ideone.com/GuDCq0

It should handle plurals.

@VasuAdari Now it does... although some answers around here don't.

I won't consider those answers :)

JavaScript 96

m=parseInt(prompt()),h=m/60|0,m%=60
alert(h+" hour"+(h!=1?"s ":" ")+m+" minute"+(m!=1?"s ":" "))

Pyth, 41 bytes
A.Ds<4z60s[G" hour"?tG\skdH>4z"ute"?tH\s"

explanation
A                                          -Assign two values, first to `G` then to `H`
 .Ds   60                                  -DivMod on integer by 60
    <4z                                    -slice everything but the last 4 chars of input
         s[                                -print all following statements on one line
           G                               -hour
            " hour"                        -string literal
                   ?tG\sk                  -ternary, if hour is 1, 's' literal, else nothing
                         d                 -space
                          H                -minute
                           >4z             -get the last 4 chars of input (" min") (so sneaky)
                              "ute"        -string literal
                                   ?tH\s"  -ternary, as before but with minutes

Milky Way 1.2.1, 63 bytes
'" "\=^A60m>?{1b_" "_"s "}" hour";+<?{1b_""_"s"}" minute";++++!

The program is too long to explain in detail here, but you can see the docs for an in-depth look.

Usage
python3 milkyway.py <path-to-code> -i <input>

Gema, 64 bytes
<N>=@p{@div{$1;60} hour} @p{@mod{$1;60} minute}
*=
p:1 *=$0;*=*s

Sample run:
bash-4.3$ gema '<N>=@p{@div{$1;60} hour} @p{@mod{$1;60} minute};*=;p:1 *=$0;*=*s' <<< '90 min'
1 hour 30 minutes

Gema, 65 bytes
<N> min=@p{@div{$1;60} hour} @p{@mod{$1;60} minute}
p:1 *=$0;*=*s

This one replaces all “\d+ min” occurrences in the input string.
Sample run:
bash-4.3$ gema '<N> min=@p{@div{$1;60} hour} @p{@mod{$1;60} minute};p:1 *=$0;*=*s' <<< $'150 min\n90 min\n61 min\n60 min'
2 hours 30 minutes
1 hour 30 minutes
1 hour 1 minute
1 hour 0 minutes

Factor, 95 88 bytes
[ readln " " split first 10 >base [ 60 / floor ] [ 60 mod ] bi "%s hrs %s mins" printf ]

Like my Go answer, doesn't handle plurals because it doesn't have to.

Pyke, 31 bytes, noncompeting
dchE60.D]~U1 3:],FDJRh1N\s*+)_J

Try it here!
Explanation:
dchE                            -     eval(input().split(" ")[0])
    60.D]                       -    [divmod(^, 60)]
               ],               -   zip(*[^,V])
         ~U1 3:                 -    ["minute", "hour"]
                 F          )   -  for _ in ^:
                     h1N        -     _[0] != 1
                        \s*     -    "s"*^
                           +    -    V+^
                   J            -     " ".join(_)
                             _J - " ".join(^[::-1])

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Encode a steganographic encoder into a package
Introduction
By steganography we mean hiding a message along an existing text or image so the result would be unsuspicious of the existence of the original message. This challenge is about hiding data in Unicode variants of a grapheme called homoglyphs. For instance:
cyrillic Е (ye) appears the same as latin E which appears the same as greek Ε (epsilon). They are all glyphs from an archetypical E grapheme and several fonts renders them the same. This allows us to hide three units of information (0 1 2) in just one character. A whole text makes room for a complex message.

Terms: A package (steganographic unsuspicious text) is a payload (message) encoded into a carrier (raw text)

Challenge

Create an steganographic encoder (SE) and decoder (SD) in your chosen golfing language. It must be capable of steganographically encoding its own code by defining its coded character set.
SE(payload, carrier) -> package
SD(package) -> payload
Create a package by encoding the encoder itself as payload in the carrier below. Then provide package and decoder. Decoder should retrieve encoder inside package.
SE(SE, carrier) -> package
SD(package) -> SE
SHORTEST PACKAGE WINS! truncate it!

Challenge input
A. Coded character set
Create a coded character set with 6 bits, 7 bits,... as much as characters your chosen language requires. You can use ASCII (8 bits) but be aware of wasting carrier capacity.
Pyth for instance requires 7 bits because it maps from 32 to 126 ASCII codes.
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ <newline>

B. Homoglyph mapping
IMPORTANT NOTE: this is NOT BINARY MAPPING. For instance there are five 'M' and 'v' homoglyphs (0 1 2 3 4). Binary mapping QＱ (0 1) is almost trivial (less than 100 bytes of steganographic encoder size)
!！ "″＂ $＄ %％ &＆ (（ )） +＋ ,‚， -‐－ .． /⁄／ 0０ 1１ 2２ 3３ 4４ 5５ 6６ 7７ 8８ 9９ :： ;;； <＜ =＝ >＞ ?？ @＠ AΑАＡ BΒВＢ CϹСⅭＣ DⅮＤ EΕЕＥ FϜＦ GԌＧ HΗНＨ  IΙІⅠＩ JЈＪ KΚКKＫ LⅬＬ MΜМⅯＭ NΝＮ OΟОＯ PΡРＰ QＱ RＲ SЅＳ TΤТＴ UＵ VѴⅤＶ WＷ XΧХⅩ YΥҮＹ ZΖＺ [［ \＼ ]］ ^＾ _＿ `｀ aаａ bЬｂ cϲсⅽｃ dԁⅾｄ eеｅ fｆ gｇ hһｈ iіⅰｉ jјｊ kｋ lⅼｌ mⅿｍ nｎ oοоｏ pрｐ qｑ rｒ sѕｓ tｔ uｕ vνѵⅴｖ wѡｗ xхⅹ yуｙ zｚ {｛ |｜ }｝ ~～ ÄӒ ÖӦ ßβ äӓ öӧ

C. Carrier

“De Chamilly obeyed; he reached Basle, and on the day and at the hour appointed, stationed himself, pen in hand, on the bridge. Presently a market-cart drives by; then an old woman with a basket of fruit passes; anon, a little urchin trundles his hoop by; next an old gentleman in blue top-coat jogs past on his gray mare. Three o'clock chimes from the cathedral tower. Just at the last stroke, a tall fellow in yellow waistcoat and breeches saunters up, goes to the middle of the bridge, lounges over, and looks at the water; then he takes a step back and strikes three hearty blows on the footway with his staff. Down goes every detail in De Chamilly's book. At last the hour of release sounds, and he jumps into his carriage. Shortly before midnight, after two days of ceaseless travelling, De Chamilly presented himself before the minister, feeling rather ashamed at having such trifles to record. M. de Louvois took the portfolio with eagerness, and glanced over the notes. As his eye caught the mention of the yellow-breeched man, a gleam of joy flashed across his countenance. He rushed to the king, roused him from sleep, spoke in private with him for a few moments, and then four couriers who had been held in readiness since five on the preceding evening were despatched with haste. Eight days after, the town of Strasbourg was entirely surrounded by French troops, and summoned to surrender: it capitulated and threw open its gates on the 30th of September 1681. Evidently the three strokes of the stick given by the fellow in yellow costume, at an appointed hour, were the signal of the success of an intrigue concerted between M. de Louvois and the magistrates of Strasbourg, and the man who executed this mission was as ignorant of the motive as was M. de Chamilly of the motive of his.”

If you run out of carrier characters (very unlikely and maybe you'll need to optimize further, but I'm not sure) duplicate the carrier.

Challenge output example
NOTE: Please be aware this solution is based on binary mapping (each char carries a 0 or 1 value) so it is far easier than the challenge.
This is the package: a steganographic encoder encoded by itself into the challenge carrier. It could be retrieved again by means of its steganographic decoder (Pyth at footnote) and its coded character set. It is rendered here by an adverse font to contrast homoglyphs.

Simplest example
Character set                   > abcdefghijklmnñopqrstuvwxyz.,?!
Coded character set (5 bits)     0123456789ABCDEF0123456789ABCDEF
Mapping (0)                      !"$%&()+,-.;<=>?@ABCDEFGHIJKLMNOPSTVXYZ[]^`acdehijmopsvwxy{|}~ÄÖäö
Mapping (1) homoglyphs           ！″＄％＆（）＋‚‐．;＜＝＞？＠ΑΒϹⅮΕϜԌΗΙЈΚⅬΜΝΟΡЅΤⅤΧΥΖ［］＾｀аϲԁеһіјⅿοрѕνѡху｛｜｝～ӒӦӓӧ

Ϝοr you whο are rеаdіng thеsе lines dіdn't you rеalize soⅿеthing that lοoks like a key іn tһe kеyһole, thаt suѕрiϲiouѕ Ϝ? These linеs аren't јuѕt οrdinary tехt but а 'package' full of unіcode νarіаnts of ѕаme grapheⅿes whiϲh lοοk verу аlike （hοⅿοglурһs). A 'pаyloаԁ' is ѡitһheld by tһe pаckage. Copу and раѕte tһіs pаrаgraph in nοteраd аnd the differences bеtween glуpһs ѡіll be renԁered notіϲeable.

This is binary mapping: we will assign a 0 to latin ordinary graphemes, and 1 to their homoglyphs
Ϝοr you whο are rеаdіng thеsе lines dіdn't you rеalize soⅿеthing that lοoks like a key іn tһe kеyһole, thаt suѕрiϲiouѕ Ϝ? These linеs аren't јuѕt οrdinary tехt but а 'package' full of unіcode νarіаnts of ѕаme grapheⅿes whiϲh lοοk verу аlike （hοⅿοglурһs). A 'pаyloаԁ' is ѡitһheld by tһe pаckage. Copу and раѕte tһіs pаrаgraph in nοteраd аnd the differences bеtween glуpһs ѡіll be renԁered notіϲeable.
11r 00u 001 0r0 r1101ng t0101 l0n00 010n't 00u r10l0z0 0011t00ng t00t l10k0 l0k0 0 k00 1n t10 k1010l00 t01t 0u110100u1 10 00000 l0n10 1r0n't 1u1t 1r00n0r0 t11t but 1 '000k0g0' full 0f un10000 10r11nt0 0f 1100 gr0000100 00010 l11k 00r1 1l0k0 10111gl111000 0 '010l011' 00 10t100l0 b0 t10 010k0g00 0001 0n0 111t0 t110 01r1gr000 0n n1t0110 1n0 t00 00ff0r0n000 b1t000n gl1010 11ll b0 r0n10r00 n0t1100bl0.

11000 w 01001 i 10101 t  01000 h 01000 h 10000 o 01100 l 00100 d 00000   11010 y 10000 o 10110 u 10011 r 00000   00101 e 01110 n 00011 c 10000 o 00100 d 00101 e 10011 r  00000   01000 h 00101 e 10011 r 00101 e 11111 ! 00000   10011 R 00101 e 00001 a 00100 d 00000   10011 r 10110 u 01100 l 00101 e 10100 s 00000   00010 b 00101 e 01100 l 10000 o 11000 w

What is inside?

 "withhold your encoder here! read rules below"

Welcome to Programming Puzzles and Code Golf! As it stands, it's not really clear what the task at hand is. At the very least some examples would be helpful. I recommend posting challenges to the Sandbox where they can get meaningful feedback before being posted to the main site.

t00t :D Already a favorite challenge.

Welcome to PPCG. This is clever, but it is not genius. A true genius can think of something clever and explain it simply. Starting at the beginning, why do you have links marked "what is steganography" and "what are homoglyphs"? By all means include the links but give a brief explanation of these terms so we don't have to click on the links. The same applies to the rest of the post. I could go on, but I hope you get the idea. There might be something in here, but the spec needs to be thorough and clear. I suggest you read (and perhaps answer) some high rated challenges to see what's required

I'm struggling to find the spec in among the examples. This format, where you put the full spec before examples, is more reader-friendly.

@AlexA. I hope it's clearer now.

Shortest package wins?  But the package is the covertext modified to encode the payload.  Every package will use the same covertext so they will be the same size.


text:
Very Simple Grid Marks
Write a program or function that takes in three positive integers, W, H, and N. Print or return a W×H grid of .'s where every Nth . in normal English reading order is replaced with an X.
For example, given W = 7, H = 3, N = 3, the grid is 7 characters wide and 3 high, and every third character reading from the top left is an X:
..X..X.
.X..X..
X..X..X

Similarly, if the input is W = 10, H = 4, N = 5, the output would be:
....X....X
....X....X
....X....X
....X....X

Notes

"Normal English reading order" means going left to right on each line, from the top line to the bottom.
When N is 1 then all the .'s will become X's.
You may use any two distinct printable ASCII characters in place of . and X.

If you use space ( ) then trailing spaces are not required when the result would be visually the same. (Empty lines are still required.)
You may not using something else in place of the newlines that shape the grid.

The exact input format and order of W, H, and N is not super important. Things like [H,W,N] or N\nW,H are alright.
A trailing newline in the output is fine.
The shortest code in bytes wins!

Examples
W = 5, H = 3, N = 1
XXXXX
XXXXX
XXXXX

W = 5, H = 3, N = 2
.X.X.
X.X.X
.X.X.

W = 5, H = 3, N = 3
..X..
X..X.
.X..X

W = 5, H = 3, N = 4
...X.
..X..
.X...

W = 5, H = 3, N = 5
....X
....X
....X

W = 5, H = 3, N = 6
.....
X....
.X...

W = 5, H = 3, N = 7
.....
.X...
...X.

W = 5, H = 3, N = 15
.....
.....
....X

W = 5, H = 3, N = 16 (or more)
.....
.....
.....

W = 1, H = 1, N = 1
X

W = 1, H = 1, N = 2 (or more)
.

W = 8, H = 6, N = 2
.X.X.X.X
.X.X.X.X
.X.X.X.X
.X.X.X.X
.X.X.X.X
.X.X.X.X

W = 8, H = 6, N = 3
..X..X..
X..X..X.
.X..X..X
..X..X..
X..X..X.
.X..X..X

W = 8, H = 6, N = 4
...X...X
...X...X
...X...X
...X...X
...X...X
...X...X

W = 8, H = 6, N = 7
......X.
.....X..
....X...
...X....
..X.....
.X......

W = 8, H = 6, N = 16
........
.......X
........
.......X
........
.......X

W = 37, H = 1, N = 4
...X...X...X...X...X...X...X...X...X.

W = 1, H = 10, N = 8
.
.
.
.
.
.
.
X
.
.

Am I correct to assume that the restriction "You may not using something else in place of the newlines that shape the grid" includes "You may not return an array ["..X..X.", ".X..X..", "X..X..X"] as the grid"?

@PeterTaylor Correct

 J, 9 5 bytes
$":&1

Uses spaces and 1's and expects input in the form H W f N
Explanation:
$":&1
   &1 bonds the fixed right argument 1 to ":
 ":   formats the right argument number (1) to take up left argument (N) number of cells
      padding with spaces, resulting  in "  1"
$     reshape to H-by-W with repeating the string if necessary

Usage:
   3 7 ($":&1) 3
  1  1
 1  1
1  1  1

Try it online here.

Does it also truncate the array if W*H is less than N?

@MartinBüttner Yes.

If the argument is ($":&1), wouldn't that count as 7 bytes?

No, the () aren't part of the function; you could write f =. $":&1 and then 3 7 f 3.

Python 2, 60 bytes
w,h,n=input()
s='%%%dd'%n%0*w*h
exec"print s[:w];s=s[w:];"*h

This prints space and 0 in place of . and X. Input is taken as a tuple in the form of w,h,n.

That's a clever string format.

J, 12 bytes
$'X'_1}#&'.'

This is a dyadic function that takes the array H W as its left argument and N as its right argument. Usage:
  f =: $'X'_1}#&'.'
  3 5 f 3
..X..
X..X.
.X..X

Explanation
$'X'_1}#&'.'
         '.'  The character '.'
       #&     repeated N times
    _1}       with the last character
 'X'          replaced by 'X'
$             reshaped into an HxW array

Right tool for the job?

Is the use of X. really shortest?

@ThomasKwa I believe so. I tried to use the numbers 0 and 1 instead, but then I had to surround the one next to _1 with parentheses, and format away the spaces between columns, and it ended up being longer.

BBC Basic, 67 ASCII characters, tokenised filesize 43 bytes
Download interpreter at http://www.bbcbasic.co.uk/bbcwin/download.html
INPUTw,h,n:WIDTHw:PRINTLEFT$(STRING$(w*h,STRING$(n-1,".")+"X"),w*h)

BBC basic has a handy command for limiting the field width. We use STRING$ to make w*h copies of the string of n-1 periods followed by an X. Then we use LEFT$ to truncate this to w*h characters.

Minkolang 0.14, 34 30 28 22 bytes
n2-D1n$zn[z[1Rd6ZO]lO]

Check one case here and check all test cases here. Expects input like N W H.
Explanation
n                 Take number from input (N)
 2-               Subtract 2
   D              Duplicate the top of stack (which is 0 because it's empty) N-2 times
    1             Push a 1 onto the stack
n                 Take number from input (W)
 $z               Store W in the register (z)
n                 Take number from input (H)
 [                Open a for loop that repeats H times
  z[              Open a for loop that repeats W times
    1R            Rotate 1 step to the right
      d           Duplicate top of stack
       6Z         Convert number to string
         O        Output as character
          ]       Close for loop
           lO     Output a newline
             ]    Close for loop

As Minkolang's codebox is toroidal, this will wrap around to the beginning. As every n will now take in -1, this eventually crashes with an error and no further output, which is allowed.

So it's easy for you to compare. (Note that it's not quite the exact same code.)

Ahead of you! :P :)

APL, 13 bytes
{⍪,/⍕¨⍺⍴⍵=⍳⍵}

This takes H W as the left argument and N as the right argument.
Explanation:
{⍪,/⍕¨⍺⍴⍵=⍳⍵}     Dyadic function (args are ⍺ on left, ⍵ on right):
        ⍵=⍳⍵      ⍵ = (1 2 3...⍵); this is ⍵-1 0s followed by a 1
      ⍺⍴          Shape by the left argument; e.g. 5 3 gives a 5x3 array
    ⍕¨            Stringify each entry
  ,/              Join the strings in each row
 ⍪                Make column vector of strings

Try it online: first test cases, last test case. Note that although this shows boxed output, my copy of Dyalog doesn't.

Are those actually just boxes, or is the SE app not displaying the characters properly?

@Carcigenicate They're not boxes. The characters should display fine on the online link, because it has a different font.

Ahh, right. I missed that. Do you have a special keyboard or are you a masochist?

@Carcigenicate On tryapl (and Dyalog student edition) you can type APL characters using backticks. `a turns into ⍺, for example.

CJam (16 bytes)
{1$*,:)@f%:!/N*}

Takes input on the stack in the order N W H, returns string using characters 0 and 1. Online demo
Dissection
{        e# Anonymous function. Stack: N W H
  1$*,   e# Stack: N W [0 1 ... W*H-1]
  :)     e# Stack: N W [1 2 ... W*H]
  @f%    e# Stack: W [1%N 2%N ... W*H%N]
  :!     e# Map Boolean not, taking 0 to 1 and anything else to 0
  /      e# Split into W-sized chunks (i.e. the lines of the grid)
  N*     e# Join the lines with newlines
}

;-; you beat me ;-; but good job! :D

CJam, 20 Bytes
q~:Z;_@*,:){Z%!}%/N*

Takes input as H W N.

whoops, invalid

fixed :D :D :D :D

Still much longer than some of the solutions in other languages, but I got it to 18 bytes with CJam: q~_@*,@(S*'X+f=/N*, with input in order N H W.

@RetoKoradi Take another one off by replacing 'X with 0, and that'll be 17

Japt, 33 32 27 25 bytes
SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses   and " in place of . and X, respectively. Try it online!
Ungolfed and explanation
SpW-1 +Q p-~U*V/W f'.pU)·qR
          // Implicit: U = width, V = height, W = interval
SpW-1 +Q  // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W  // Repeat this string ceil(U*V/W) times.
f'.pU)    // Split the resulting string into groups of U characters.
qR        // Join with newlines.
          // Implicit: output last expression

Suggestions welcome!

Vitsy, 25 23 22 21 19 Bytes
Thanks to @Sp3000 for pointing out that I don't need a duplicate and saving me 2 bytes!
Takes input as N W H. Try it online!
1}\0XrV\[V\[{DN]aO]
1                         Push 1 to the stack.
 }                        Push the backmost to the front and subtract 2.
  \0X                     Duplicate the 0 temp variable times.
     r                    Reverse the stack.
      V                   Save as final global variable.
       \[         ]       Repeat top item times.
         V\[   ]          Repeat global variable times.
            {DO           Duplicate, output, then shift over an item.
                aO        Output a newline.

K, 21 19 18 14 bytes
Takes arguments as (H W;N):
{".X"x#y=1+!y}

In action:
  f:{".X"x#y=1+!y};

  f.'((3 5;1);(3 5;2);(3 7;3);(4 10;5);(3 5;16))
(("XXXXX"
  "XXXXX"
  "XXXXX")
 (".X.X."
  "X.X.X"
  ".X.X.")
 ("..X..X."
  ".X..X.."
  "X..X..X")
 ("....X....X"
  "....X....X"
  "....X....X"
  "....X....X")
 ("....."
  "....."
  "....."))

MATLAB, 61 55 54 bytes
function c=g(d,n);b=ones(d);b(n:n:end)=0;c=[b'+45,''];

Wow, I thought MATLAB would be competitive in this one, but how wrong I was!
The function creates an array of 1's of the correct dimensions, and then sets every n'th element to be 0 (MATLAB implicitly handles wrapping around the indices into 2D). We then add on 45 ('-') to this number and converted to a char array to be returned.
The questions allows any distinct two ASCII characters to be used for the grid, I am using '-' in place of 'x' to save some bytes. The input format is also not fixed, so it should be supplied as [w h],n - i.e. an array of width and height, and then n as a second parameter.

This also works with Octave and can be tried online here. The function is already set up in the linked workspace, so you can simply call for example:
g([4,5],3)

Which outputs:
..-.
.-..
-..-
..-.
.-..

Save one byte: c=[b'+45,''];

@StewieGriffin Thanks :). For some reason when I'd tried that I didn't think it saved any bytes, I must have miscounted!

Processing, 93 bytes (Java, 104 bytes)
void f(int a,int b,int c){for(int i=0;ic-2?"X":".")+(i%a>a-2?"\n":""));}}

The reason I used Processing instead of Java is that you don't need to acces the pointer by tiping System.out because a local variable is directly accessible. I earned 11 bytes with this. The function doesn't return the result but prints it.

You can save another by moving the increment (like i++%a...), and it looks like you left a spare } at the end you don't need, also.

K (ngn/k), 10 bytes
{y#|x$"X"}

Try it online!
Takes input as two arguments; N as the first/left arg, and (H;W) as the second/right arg. Uses " " and "X" as the output characters.

|x$"X" right pad "X" to the desired length (fills with spaces), and reverse it (to put the "X" at the end)
y# reshape the above to the desired dimensions; the above gets repeated over and over until it is long enough

Pyth - 19 18 17 bytes
Hope to golf it more. Takes input as N\n[W, H].
jc.[k+*dtvzN*FQhQ

Test Suite.

R, 66 bytes
function(w,h,n){x=rep(".",a<-w*h);x[1:a%%n<1]="X";matrix(x,h,w,T)}

This is a function that accepts three integers and returns a matrix of character values. To call it, assign it to a variable.
Ungolfed:
f <- function(w, h, n) {
    # Get the area of the square
    a <- w*h

    # Construct a vector of dots
    x <- rep(".", a)

    # Replace every nth entry with X
    x[1:a %% n == 0] <- "X"

    # Return a matrix constructed by row
    matrix(x, nrow = h, ncol = w, byrow = TRUE)
}

JavaScript (ES6), 65 60 bytes
(w,h,n)=>eval('for(i=r=``;i++<w*h;i%w?0:r+=`\n`)r+=i%n?0:1')

Explanation
(w,h,n)=>eval('    // use eval to remove need for return keyword
  for(
    i=             // i = current grid index
      r=``;        // r = result
    i++<w*h;       // iterate for each index of the grid
    i%w?0:r+=`\n`  // if we are at the end of a line, print a newline character
                   // note: we need to escape the newline character inside the template
  )                //       string because this is already inside a string for the eval
    r+=i%n?0:1     // add a 0 for . or 1 for X to the result
                   // implicit: return r
')

Test

W = <input type="number" id="W" value="7" />

H = <input type="number" id="H" value="3" />

N = <input type="number" id="N" value="3" />

<button onclick="result.innerHTML=(

(w,h,n)=>eval('for(i=r=``;i++<w*h;i%w?0:r+=`\n`)r+=i%n?0:1')

)(+W.value,+H.value,+N.value)">Go</button>

Mathematica, 85 bytes
""<>(#<>"
"&/@ReplacePart["."~Table~{t=# #2},List/@Range[#3,t,#3]->"X"]~Partition~#)&

As with many other solutions, this creates a single row, then partitions it.

JavaScript (ES6), 55 bytes
(w,h,n)=>(f=i=>i++<w*h?+!(i%n)+(i%w?"":`
`)+f(i):"")(0)

Uses the IIFE f to loop to save a return statement.
Output for w=5, h=3, n=7:
00000
01000
00010

C#, 185 bytes
using System;class x{void a(int w,int h,int n){int c=1;for(int i=0;i<h;i++){for(int j=1;j<=w;j++){if(c%n==0){Console.Write("x");}else{Console.Write(".");}c++;}Console.WriteLine();}}}

For a more readable Reading:
using System;
class x
{
  void a(int w, int h, int n)
  {
    int c = 1;
    for (int i = 0; i < h; i++)
    {
        for (int j = 1; j <= w; j++)
        {
            if (c % n == 0)
            {
                Console.Write("x");
            }
            else
            {
                Console.Write(".");
            }
            c++;
        }
        Console.WriteLine();
     }
  }
}

Usage:
new x().a(7, 3, 3);

Vyxal 3 jR, 8 bytes
×ƛ?Ḋ]¹Ẇ“

input as W,H,N
Try it Online!
×ƛ?Ḋ]¹Ẇ“
×ƛ  ]     # Map over the range H x W
  ?Ḋ      # Divisible by N?
     ¹Ẇ“  # Split into chunks of length W and join on nothing
# j flag joins on newlines

Created with the help of Luminespire.

Ruby, 67 56 bytes
->w,h,n{(1..h).map{(1..w).map{o,$.=$.%n<1?1:0,$.+=1;o}}}

Printing an array since it is accepted.
67 bytes
->w,h,n{i=1;puts (1..h).map{(1..w).map{o,i=i%n<1?1:0,i+=1;o}.join}}

Ungolfed:
-> w, h, n {
  (1..h).map {
    (1..w).map {
      o, $. = $.%n < 1 ? 1 : 0, $.+ = 1
      o
    }
  }
}

Usage:
->w,h,n{(1..h).map{(1..w).map{o,$.=$.%n<1?1:0,$.+=1;o}}}[8,6,7]
=> [[0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0]]

Julia, 50 bytes
f(w,h,n)=reshape([i%n<1?"X":"." for i=1:w*h],w,h)'

This creates a function f that accepts three integers and returns a 2-dimensional array of strings.
Ungolfed:
function f(w::Integer, h::Integer, n::Integer)
    # Construct an array of strings in reading order
    a = [i % n == 0 ? "X" : "." for i = 1:w*h]

    # Reshape this columnwise into a w×h array
    r = reshape(a, w, h)

    # Return the transpose
    return transpose(r)
end

MATLAB, 44 bytes
Note: Very different approach than the one used by Tom Carpenter.
@(x,y)char(reshape(~mod(1:prod(x),y),x)'+46)

Defines an anonymous function that accepts inputs as [W,H],N. I approached this problem using not-the-modulo-of-N for an array 1:W*H and then simply reshaping the solution to a two-dimensional array, which is then converted to a character array.
Example output for [5,3],7:
.....
./...
.../.

Common Lisp, SBCL, 94 bytes
(lambda(a b c)(dotimes(i(* a b))(format t"~:[.~;X~]~@[~%~]"(=(mod(1+ i)c)0)(=(mod(1+ i)a)0))))

Explanation
~:[.~;X~] <-- takes argument - if argument is true write ., if false write X
~@[~%~] <-- takes argument - if argument is true write newline, if not treat argument as if it was not used

(=(mod(1+ i)c)0)(=(mod(1+ i)a)0) looks pretty silly (because it's so similiar but I don't know if it can be solved, saving bytes
I use (1+ i) instead of i because dotimes starts from i=0 and I want to start from 1. It is also helpful because I can use (* a b) instead of (1+(* a b))

Japt -R, 9 bytes
Takes input as [W,H],N and uses spaces instead of .s & "s instead of Xs.
×îQùV)òUÎ

Try it

Uiua, 17 bytes
↯⇌⊟⊙⊙(⇌⊂@X↯:@.-1)

Test pad

Perl 5 -a, 44 bytes
print$_%$F[1]&&1,$/x!($_%"@F")for 1.."@F"*<>

Try it online!
Input format is:
W N
H

Output uses 1 for the spacer and 0 for the character.

Java, 185 183 bytes
Thanks Thomas Kwa, for saving me 2 bytes!
interface B{static void main(String[] a){int w = Byte.parseByte(a[0]);for(int i=0;i++<w*Byte.parseByte(a[1]);)System.out.print((i%Byte.parseByte(a[2])>0?".":"X")+(i%w<1?"\n":""));}}

Ungolfed (ish):
interface A {
  static void main(String[] a) {
    int w = Byte.parseByte(a[0]);
    for(
      int i = 0;
      i++ < w*Byte.parseByte(a[1]);
    )
      System.out.print((
        i%Byte.parseByte(a[2]) > 0 ? "." : "X"
        )+(
        i%w < 1 ? "\n" : ""
      ));
  }
}

Usage:
$ java B 5 3 7
.....
.X...
...X.

Maybe java will win one day :P

I think you can use >0 instead of !=0, and <1 instead of ==0.

You can remove useless whitespace after String[] and around = to get -3 bytes down