https://ide.codingblocks.com/s/57941
what is the time complexity of this program?
This particular code has time complexity of O(n^2), because both the loops increase linearly. In general, sieve can be implemented in O(nlogn) time.