bolo17

Lab 3 - Full Switch Case

Aug 24th, 2020
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. What is Switch Statement in C?
  2. Switch statement in C tests the value of a variable and compares it with multiple cases. Once the case match is found, a block of statements associated with that particular case is executed.
  3. using System;
  4. using System.Collections.Generic;
  5. using System.IO;
  6. using System.Linq;
  7. #include <stdio.h>
  8. int main() {
  9. int num = 8;
  10. switch (num) {
  11. case 7:
  12. printf("Value is 7");
  13. break;
  14. case 8:
  15. printf("Value is 8");
  16. break;
  17. case 9:
  18. printf("Value is 9");
  19. DOWNLOAD LINK:https://ouo.io/jwj53j
Add Comment
Please, Sign In to add comment