Question: Calculate the running time for the given algorithm Sno Statement Frequency 1 ALGORITHM CALCULATE ( ) 2 { 3 INT A , B , C

Calculate the running time for the given algorithm
Sno Statement Frequency
1 ALGORITHM CALCULATE()
2{
3 INT A, B, C, D
4 FLOAT P =3.14, X =15.115
5 BOOLEAN T = FALSE, F = TRUE
6 READ A, B, C
7 D =((2* A / B +45)^2)/(A++* C)
8 FOR X =-7 TO N-4
9{
10 IF (X %10<3) THEN
11{
12 PRINT A, B, C++
13 READ M
14 G = M + R
15}
16 ELSE
17{
18 READ M
19 M++
20 M++
21}
22 FOR Y = N TO 0 STEP -1
23{
24 SUM = SUM + J
25 SUM--
26 PRINT A, B^2
27}
28 PRINT X
29}
30 PRINT SUM
31}
Total Running Time T(n)

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 Programming Questions!