0% found this document useful (0 votes)
15 views1 page

Exercises

Uploaded by

DeymosS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views1 page

Exercises

Uploaded by

DeymosS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

int х,у,а; int x=3,y=5; int x=3,y=5;

х=9; if(x>y) x+=2; if(x>y) x-=2;


у=х%2+7; Q=1+2+1=4 else y=0;
а=у/4; Q=1+max(1,2)+1=4
Q=1+3+2=6
struct Foo int x=3,y=4; int x=-3,y;
{ switch (2*x) if(x<-1) y=2*x;
int x=3; int y=2; { else if (x<=5) y=x+4;
}f; case 3: else if (x<7) y=x*x;
if(f.x>f.y) f.x+=1; a=x+1; b=y+1; break; else y=2*x+3;
else f.y-=1; case 4: Q1=1
Q=1+max(2,2)+1=4 a=x-1; b=y-1; break; Q3=2
case 6: a=2*x; b=2*y; break;
default: a=x/2; b=y; break; Q2=1+2+1+1+max{2,3}+1=9
} Q=1+9+1+11
Qe+max{Qn,Qn,…,Qn}+k+1
Q=1+max {4,4,4,3}+4+1=10
int x=3,y; int counter = 0; int sum = 0;
if(x<1) y=2*x; for (int c=2;c<=50;c+=2) int a[3][3];
else if (x<=4) y=x+4; counter ++; for (int i = 0; i < 3 ; ++i)
else if (x<8) Qe1=1    for (int j =2; j < 3 ; j++)
y=x*x; Qe2=1      sum += a[i][j]; 
else y=2*x+3; Qe1=1
Qe+max(Q1,Q2)+1 Qe3=2
Q1=2 Ee2=1
Qe=1
Q1=2 M=n-2 Qe3=2
Q2=1+2+1+1+max(2,3)+1=9 Q=1+(n-2+1)*+(n-2)*2+(n- M=n-1
Q=1+9+1=11 2)*2+1=1+n-1+2n-2+1=5n3 {Qe1=1
Qe2=1
Qe3=2
Q=4
M=n-2
Q=1+(n-2+1)*1+(n-2)2+(n-2)4+1=1+n-
1+2n-4+4n-8+1=7n*3)
Q=1+(n-1+1)*1+(n-1)*1+(n-1)*(7n-
3)=1+n+n-1+7n^2-7n-3n+3+1=7n^2-8n+4
int j,s; int sum = 0; int c=0;
for(j = 8; j >0; j--) int a[3][3]; for(int i=2; i<7; i++)
s= 4 * j; for(int i=1; i<3;++i) for(int j=8; j>3; j-=2)
for (int j=1;j<3; j++) c++;
sum += a[i][j];
int t=0, c=0; int c=0; int c=2, s=0;
while(t<7) for(int i=4; i<9; i+=2) while(c<5)
{ for(int j=5; j<2; j++) {
for(int i=0; i<t; i++) c++; for(int k=1; k<6; k++)
c++; s*=c;
t++; c++;
} }

You might also like