(The third loop executes only when j%i == 0, which will be true for j = i, 2i, 3i, ... i*i. i.e., it also executes i times. )
We have to count the number of times the statement $c = c + 1;$ is executed.
the outer $i$ loop executes from $1 .. n$.
for $i = 1, 2, 3, 4, \dots n$
the $k$ loop will execute for $j$ values
$(1), (2,4), (3,6,9), (4,8,12,16), \dots ,\left(n,2n,3n,\dots n^2\right)$
So, we have to count the iterations for k, which will give
$\sum_{i=1}^{n} \sum_{j=1}^{i} j \times i \\
= \sum_{i = 1}^{n}i.\sum_{j=1}^{i} j
\\= \sum_{i=1}^{n} i \frac{i.(i+1)}{2}
\\= \sum_{i=1}^{n} \frac{i^3+i^2}{2}
\\= O(n^4)$
(We can assume the sum to the cubes of first n natural numbers)