ADVANCED CONCEPTS USING FOR LOOPS

1   Using 1 for loop add up the numbers 1 -100

2   Using 1 for loop compute the factorial of 50

3   Using 2 nested for loops compute the factorial of n

4   Using 2 nested for loops compute the total of the factorials
     of the odd numbers between 1 and 100

5   Given an int array called x that is 1 dimensional and n big,
     use 1 for loop to add the values in the odd numbered
     positions to the values in the position immediately before it

6   Using 1 for loop count the number of times that the letter
     'P'  occurs in a string called x that is n big.

7   Using 1 for loop count the number of times a letter 'J' is
     is preceded by a letter of higher value 2 position in front
     of where the 'J' is. The string is called x

8   Using 1 for loop reverse the order of the values in an array
     called x that 1 dimensional and is n big

9   Solve the following for t

     int t,a,b,c;
     t=2;
     for (a=1;a<6;a++)
      {
        for(b=2;b<=a;b++)
         {
           t=t+a;
         }
        t++;
       for(c=1;c<=a;c++)
          t+=c;
      }            t ____________