View the step-by-step solution to:

# 00 Week 7 Quiz This question was created from FIN 100 Week 7 Quiz

This question was created from FIN 100 Week 7 Quiz https://www.coursehero.com/file/22157453/FIN-100-Week-7-Quiz/

(TCOs 6 and 8) Which is the output of the following C# code if the numbers input are 5 and then 5? static void Main(string[] args) { int n1, n2, temp; Console.Write("Enter a number: "); n1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter a number: "); n2 = Convert.ToInt32(Console.ReadLine()); temp = goofy(n1, n2); Console.WriteLine("The answer is " + temp); Console.ReadLine(); } public static int goofy(int x, int y) { int ans; if (x>y) { ans = 2 * (x-y); } else if (x<y) { ans = 2*(x+y); } else { ans = x+y; } return ans; } which is the correct answer? 10 60 20 30

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents