My problem states: Write a program using a while or do/while loop to generate a conversion table for converting degrees to radians. The degree values start at 0 degrees, increment by 10 and go through 360 degrees.
I'm very, very new at coding in general, and this is for my C++ class
I've come up with this so far:
#include <iostream>
using namespace std;
int main()
{
double degrees, radians, degree1
do
{
radians = 3.14159265/180
degree1 = (0 * radians)
degrees = (degree1 + 10) * radians;
}
while (degrees > 360);
return 0;
}
However, I don't have a great grasp on do-while loops, and I'm having troubles getting the code to run. Any tips would be greatly appreciated!