+ 3

just trying to look for improvements

I have only been working with c# for a couple of weeks in my spare time and trying to look for feedback to improve. What are your go-to websites for peer review and feedback on your work? Everyone talks about stack overflow but unless you have a specific coding question about your code your post gets dropped. On that note, this is a problem I was working on that calculates the angles between hands on a clock. How can I improve upon it? It feels jumbled to me and it probably is as I deleted and rewrote different sections multiple times. using System; namespace Exam { class HandsAngle { static void Main() { int hours = int.Parse(Console.ReadLine()); int minutes = int.Parse(Console.ReadLine()); // Write your code here if (Math.Abs((minutes * 6) - ((hours * 30) + (minutes * 0.5))) < 180) { Console.WriteLine(Math.Abs((minutes * 6) - ((hours * 60 + minutes) * 0.5))); } else Console.WriteLine(360 -(Math.Abs((((hours * 60 + minutes) * 0.5)) - (minutes * 6))));

7th Dec 2019, 12:14 AM
Cody EB
Cody EB - avatar
2 Respostas
+ 3
Much appreciated @ODLNT, signed up now, kind of reminds me of Codesters(use it for my kids).
8th Dec 2019, 3:14 AM
Cody EB
Cody EB - avatar