I hardly know any math, but I put this together by looking at other suggestions. It feels a bit roundabout, although I can’t put my finger on it. At least it gets the desired result.
// Including math library
int main (int argc, const char * argv)
// Declaring x to be 1.0 double x = (1.0); // Declaring variable "result" to be sin(x). double result = sin(x); // Prints the variable "result" with 3 decimals. printf("The sine of 1 radian is %.3f.\n", result); return 0;