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 d = 10;
NSLog(@"Enter a number: ");
NSLog(@"c c^2 c^3");
for (rows = 1; rows <= 1; rows++)
NSLog(@"%d %d %d, rows, rows*rows, rows*rows*rows);
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!