@Abhrajyoti00 yes i was wrong and @Argharupa Adhikary yes you are correct.
It will be $\Theta (n^{4})$.
for (int k=0; k<j; k++)
printf("*");
This loop will run for $\Theta (j)$ time.
for (int j=1; j< i*i; j++)
{
if (j%i == 0)
{
for (int k=0; k<j; k++)
printf("*");
}
}
Here outer for loop will run for $\Theta (i^{2})$ times. In each iteration if (j%i ==0) satisfies, then the inner loop will run for $\Theta (j)$ time otherwise if it doesnot satisfy then it will be $\Theta (1)$.
So now we will analyze, that how many times this (j%i==0) will satisfy.
→ It will satisfy when j=i,2*i,3*i….(i-1)*i.
→ Therefore inner for loop will run when j=i,2*i,3*i….(i-1)*i.
→ So time complexity will be : i+2i+3i+…….+(i-1)*i
= i(1+2+3+…..+(i-1)) = $\Theta (i^{3})$
Since, $\Theta (i^{3})$ is greater than $\Theta (i^{2})$. Therefore final time complexity will be $\Theta (i^{3})$.
for (int i=0; i<n; i++)
{
for (int j=1; j< i*i; j++)
{
if (j%i == 0)
{
for (int k=0; k<j; k++)
printf("*");
}
}
}
So finally we can say the time complexity will be,
$\sum_{i=1}^{n}(i^3{})$ = $\Theta (n^{4})$.