r/programminghelp • u/psychosquatch42 • Feb 01 '17
Help with a C Loop.
So i have to create program with a loop that outputs the program below, im at a loss for where i should start, any help at all would be appreciated.
#include <stdio.h>
#define PI 3.141593
int main()
{
int degrees = 0;
double radians;
printf("Degrees to Radians \n");
degrees = 0;
radians = degrees*PI/180;
printf("%6i %9.6f \n", degrees, radians);
degrees = 10;
radians = degrees*PI/180;
printf("%6i %9.6f \n", degrees, radians);
.
.
.
degrees = 360;
radians = degrees*PI/180;
printf("%6i %9.6f \n", degrees, radians);
}
3
Upvotes
2
u/psychosquatch42 Feb 01 '17
Would you mind showing me what that would look like for one line of my code, so that i have a basis to work from, im just beginning in C and im still struggling with the basics, im so sorry.