November 2013
Beginner
325 pages
9h 47m
English
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 0;
}
The output should be:
The third angle is 90.00
Read now
Unlock full access