program has crashed at run time.when my code reach to NSMutableArray where I used arryWithObjects
method to save some objects in it here is my code
(NSMutableArray *) NumSysToNumSysMultiplyMetd:(NSString *)DecCode lenthOfDecCode
:(int)length NumSysMultiplyValue
:(int)value
{
NSString * step1 = DecCode;
int Step2 = 0;
NSString *step2s=@"=> ";
int finalAnswer=0;
for (int i=length,j=0; i >=0; i--,j++)
{
NSString *digit;
digit = [NSString stringWithFormat:@"%c",[DecCode characterAtIndex:j]];
step1 = [step1 stringByAppendingString: [NSString stringWithFormat:@"%@ * %i^%i + ",digit,value,i]];
Step2= [digit integerValue] * pow(value, i);
step2s= [step2s stringByAppendingString:[NSString stringWithFormat:@" %i +",Step2]];
finalAnswer =finalAnswer + Step2;
}
NSMutableArray *mut = [NSMutableArray arrayWithObjects:step1,step2s,finalAnswer,nil];
return mut