Question: Derive Complexity function, Big Oh (0) notation and Running time Here the number of rows can be assumed as 20, 000000. #include Void main ()
Derive Complexity function, Big Oh (0) notation and Running time
Here the number of rows can be assumed as 20, 000000.
#include
{ int i,j,n;
printf("Enter the number N "); scanf("%d",&n);
printf("Prime numbers are:- "); for(i=2;i<=n;i++) { int c=0; for(j=1;j<=sqrt(i);j++) { if(i%j==0) { c++; } } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
