Challenge
The interior angles of a triangle must add up to 180 degrees. Create a new C Command Line Tool named Triangle. In main.c, write a function that takes the first two angles and returns the third. Here is what it will look like when you call it:
#include <stdio.h> // Add your new function here int main(int argc, const char * argv[]) { float angleA = 30.0; float angleB = 60.0; float angleC = remainingAngle(angleA, angleB); printf("The third angle is %.2f\n", angleC); return ...
Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.