Assessment B
← Assessments
Intermediate
Level
50–60 min
Duration
Coding Practical
Type
60 pts
Total
T1

Grade Classifier (if-else ladder)

15 pts
Paste your complete C code here:
Build a C program that reads marks (0–100) and prints:
  • 90+ : Grade A
  • 80–89 : Grade B
  • 70–79 : Grade C
  • 60–69 : Grade D
  • Below 60 : Grade F
Also handle invalid input: marks < 0 or > 100.
T2

Menu App (switch-case)

15 pts
Paste your complete C code here:
Create a menu with these options:
  • 1. Start Game
  • 2. View Rules
  • 3. Exit
Use switch to print output for each option.
Use default for invalid option. Don't forget break.
T3

Loop Challenge (for + continue)

15 pts
Paste your complete C code here:
Print numbers from 1 to 20, but skip multiples of 3.
Expected output: 1 2 4 5 7 8 10 11 13 14 16 17 19 20
Use for loop and continue statement.
T4

Mixed Challenge (while + break)

15 pts
Paste your complete C code here:
Keep taking positive numbers from the user and add them to sum. Stop when user enters 0.
  • Use a while loop
  • If number is negative: print warning and ignore it
  • At the end: print total sum
Tip: read each number inside the loop; stop when the user enters 0 (don’t add 0 to the sum).
🚀

Turn in your code online

Paste your programs above. Sign in with Google before submitting. Your submission is private to your class for grading.

← Back to Assessments