# Thread: CS502 Assignment Solution Required!!!!!!!!

1. ## CS502 Assignment Solution Required!!!!!!!!

Plz any one can send the solution of Cs502 . Today is extended day .........  Reply With Quote

2. ## Code:
``` Question # 1 Solution
y=0;     //Initialize y=0
x=0;     //Initialize x=0
for (i=n; i>0;i=i-1)       //  This loop will run approximately n times
{ y=y+1;}                     // The loop will run approximately n times and add the value of 1 in y.
for (i=1;i<=n;i=i*3)   //This statement will run approximately 2n-1 times.
{           //First loop Start
for (j=1;j<=3n;++j) // In the nested loop, The variable j depends upon the value of 3n.
{           //Second loop Start
for(k=0;k<n; k=k+5) //In the nested loop again, The statement will run n/5 times
{           //Third loop Start
x=x+5;             // The statement add 5 in the X variable.
}           //Third loop close
}           //Second loop close
}           //First loop close```  Reply With Quote

3. Bundle of Thanx  Reply With Quote

4. ## welcome....  Reply With Quote