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 Void main ()

{ 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!