Beginner C#
২টি অনুশীলন · শেখানোর ক্রমে
- 1Score to letterWrite `static string Grade(int score)`: 90+ is "A", 80-89 "B", 70-79 "C", 60-69 "D", below 60 "F". Scores outside 0-100 return "invalid".if/else chainsboundaries7m
- 2Sum of digitsWrite `static int SumDigits(int n)` returning the sum of the digits of a non-negative number. `SumDigits(1234)` is 10; `SumDigits(0)` is 0.modulointeger divisionloops8m