Homework4-2

# Homework4-2 - Homework#4 Program HW4_2 Written by Justin...

This preview shows pages 1–2. Sign up to view the full content.

Homework #4 /* * Program HW4_2 * Written by Justin Waters * Inputs:lower and upper range of degrees * Outputs: Tables of degrees and values for their sin and cos * Description: This program will print out a table showing angle measures and their sine and cosine values * */ #include <stdio.h> //printf,scanf defined #include <math.h> //math functions defined int main (void) { int init_degree, final_degree, step_degree, x; //beginning degree angle for table double a, b; //used for calculations //tells user what the program will do printf("This program will print a table of values in radians \nfor the sine and cosine of specific angles in degrees\n"); //loop for getting lower range value first from user do { printf("\nEnter the lower degree value for your range > "); scanf("%d", &init_degree); printf("\nEnter the upper degree value for your range > "); scanf("%d", &final_degree); if (init_degree >= final_degree) printf("\nYou entered your upper range value first,\nplease enter the lower range value first");

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

Homework4-2 - Homework#4 Program HW4_2 Written by Justin...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online