Jeffrey Jordan

Jeffrey Jordan

  • NA
  • 14
  • 822

Trying to learn the basics of C#

May 3 2019 9:23 PM
Hi, I'm working on challenges to help me get used to c#. I know some c++, but I have a class next semester that is using c#, and I want a leg up.
 
The challenge is to find r2 given that (r1+r2) / 2 = s , or rather, the mean of two numbers. 
You're given r1 and s, so you use math or logic to find r2.
 
I can do this in two different ways. The first, is just algebra, and the other is a loop.
It's giving me a run-time error which can mean too much memory or compilation time too long.
 
Can anyone tell me why my code attempts are sketchy?
 
Thank you. 
 

Attachment: ckat.zip

Answers (4)