I admit that I wasn’t able to figure this one out… I had to look at this forum for the answer on how to get this function to execute. Now that I see how this was handled, it makes perfect sense.
The only problem is that I am trying to run my program and it keeps crashing and won’t print the desired answer. Please see below.
// main.m
// Triangle
//
// Created by iMac on 1/19/15.
// Copyright © 2015 Big Nerd Ranch. All rights reserved.
//
#import <Foundation/Foundation.h>
static int totalValue = 180.0;
int main(int argc, const char * argv[])
{
float angleA = 30.0;
float angleB = 60.0;
float angleC = totalValue - (angleA + angleB);
printf(“The third angle of the triangle is %.0f.\n”, angleC);
return 0;
}
What am I doing wrong?