Hey Bucky!

I love your Objective-C tutorials!  They're easy to learn from, which is key since I'm still a beginner at Objective-C.

My question deals with calculating rows of numbers based on a number entered and restarting the loop based on a wrong input.

For instance, if I'm creating a rows of numbers and want to calculate say 'c' like so:

{
     int c;
     int d = 10;
     int rows;

     NSLog(@"Enter a number: ");
     scanf("%i", &c);

     {
          NSLog(@"c c^2 c^3");
          for (rows = 1; rows <= 1; rows++)
               {
                    NSLog(@"%d %d %d, rows, rows*rows, rows*rows*rows);
               }

return 0;
}

How can I create the termination and loop?  I was thinking of doing an if else statement but not sure how to restart the loop if someone entered the wrong number, such as 11 or higher.

Thanks in advance!

--Al G.