if (thisstage < 51) y = 1;
else if (thisstage < 101) y = 2;
else if (thisstage < 151) y = 3;
else if (thisstage < 201) y = 4;
else if (thisstage < 251) y = 5;
else if (thisstage < 301) y = 6;
else if (thisstage < 351) y = 7;
else if (thisstage < 401) y = 8;
else if (thisstage < 451) y = 9;
else if (thisstage < 501) y = 10;
어떻게 해야 가독성 유지보수 좋게 줄일 수 있을까
생각나는건 for 뿐
스위치
If문이나 for문을 쓸 게 아니라 그냥 산수식을 쓰셈.
50으로 나눈 값을 올림하셈 ㅇ ㅅㅇ. 51 을 50을 나누면 0.02고 올림하면 1되니까 ㅇ ㅅㅇ; 한줄로 가능
gcc 쓴다면 스위치문에 등호 붙일 수 있는데 결국 같은 코드겠군