Revision Session
This session covers a comprehensive review of all topics from the previous sessions. Complete the 3 practice problems below to test your understanding.
Practice Problems
Problem 1I/O & Data Types
Sum of Two Numbers
Read two integers from the user and print their sum. Make sure to handle the case where the sum might overflow.
// Sample Input: 5 7 // Sample Output: 12
Problem 2Control Flow
Grade Calculator
Given a score (0-100), print the corresponding grade: A (90-100), B (80-89), C (70-79), D (60-69), F (below 60).
// Sample Input: 85 // Sample Output: B
Problem 3Loops
Factorial
Given a non-negative integer n, print n! (n factorial). Remember: 0! = 1.
// Sample Input: 5 // Sample Output: 120