int N; int i; for ( i = 0; i < N; i++ ) do_fundamental_op(); 
The do_fundamental_op() is executed N times
We say that:

int N; int i, j; for ( i = 0; i < N; i++ ) for ( j = 0; j < N; j++ ) do_fundamental_op(); 
The do_fundamental_op() is executed N^{2} times
We say that:

Examples: running times
Running time of algorithm 1 = N^{2} Running time of algorithm 2 = 4 N^{2} Running time of algorithm 3 = 100 N^{2} 
All the above running times grows quadratically with the parameter N
Graphically:

Proof: Let c_{0} = 5 Let N_{0} = 0 Clearly: 4 N^{2} < 5 N^{2} for N > 0 or 4 N^{2} < c_{0} N^{2} for N > N_{0} 
Hence: g(N) = 4 N^{2} is O(N^{2})
Proof: same as above, just use c_{0} = 101

int numberGrade; // Assume it has been given a value if ( numberGrade >= 90 ) System.out.printf("A"); else if ( numberGrade >= 80 ) System.out.printf("B"); else if ( numberGrade >= 70 ) System.out.printf("C"); else if ( numberGrade >= 60 ) System.out.printf("D"); else System.out.printf("F"); 
The algorithm will perform at most 4 comparisons (ifstatements)
Because 4 is a constant, the running time of this algorithm is O(1)
int N; int A[N]; // Assume it has been given values int i, max max = A[0]; for ( i = 0; i < N; i++ ) if ( A[i] > max ) max = A[i]; 

Thus, the running time of this algorithm is O(N)

That is the case when "time" will matter...
But: we also aim for accuracy when it can be achieved with not too much effort
