Question: I am working on an application that retrieves photos from iOS photo library. When the photo is selected, I want to target a .xib to show an interface where the selected photo can be edited. 

However the build is failing due to this error:

> 
> "Unexpected interface name 'imageEditorView': expected expression"
> 
> 
> 

Here is the code:

```
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:    (NSDictionary *)launchOptions
{
    [self dismissViewControllerAnimated:YES completion:^{
        [self.parentViewController presentViewController:imageEditorView: animated:YES completion:nil];
    }];
}

```

I have all the externals imported correctly in the .h files for both controllers. Any help would be greatly appreciated.

Answer: 
This is what you need

```
int f = 1;
int s = 0;
for (i = 1;i <= n;i++)
{     
    f *= i;
    s += f;
}

```

But i would suggest you look at your own code with a debugger to learn how things are working

Edit:

`for (i=1;i<=n;i++);` is equivalent to `i = n+1`

The block here is useless, you're just setting p to 1;

```
{
 p=1;    
}

```

In the following i is always `n+1` and `p` is always 1, so you are effectively doing `i+i+i...` for n times 

```
for (j=1;j<=i;j++)
{
   s=s+(p*i);
}

```
The ; after the first "for" ends the statement, so that's an empty loop. Also, the second loop should be inside the first one and it's not. Indenting the code isn't just cosmetic--it can help clarify code like this.