Ok so Im trying to make the user enter an angle and if the angle is greater than 360 im trying to scale it back down by - 360, if its less than 0 I want it to + 360. However currently I cant even get it to subtract, It keeps giving me garbage output and when I try to pass it by refrence by adding a & in front of angle the compiler gives me an error

Code:
#include <iostream>
#include <cmath>
#include <string>
using namespace std;

int main(void)
{
    double angle = 0;
	cout << "Please enter angle : " << endl;
	cin >> angle;
	
	while (360 < angle) {
	angle = angle - 360;
	cout << angle;
	}
	
	
	

	
		 

return 0;
}