我正在尝试计算从文本字段中获取值并将其乘以标签值的平均值。
int grade1 = [[self.Cw1Grade text]intValue];
int grade1weight = self.weight1.text.intValue;
int a1grade = grade1 / 100;
int a1total = a1grade * grade1weight;
NSString *grade1total = [NSString stringWithFormat:@"%d", a1total];
[self.averageLabel setText:grade1total];
帮助感谢您的时间