CJCoding With Joseph
← Back to Question List
C# Code Walkthrough #12

Integer Division Before Widening

mediumCasting

📄 Code

Read carefully — what does this print?
1int a = 5, b = 2;
2double avg = (a + b) / 2;
3Console.WriteLine(avg);

🎯 Your Answer