Switch Letter - break...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// This program demonstrates switch statements using characters as switch cases #include <stdio.h> void main() { char grade; printf("Enter a grade "); scanf("%c",&grade); switch(grade) { case'E':case'e':printf("Excellent\n");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: break; case'S':case's':printf("Satisfactory\n"); break; case'U':case'u':printf("Unsatisfactory\n"); break; default:printf("Invalid input\n"); } }...
View Full Document

This note was uploaded on 10/05/2011 for the course CS 36 taught by Professor Sethhochwald during the Spring '09 term at Irvine Valley College.

Ask a homework question - tutors are online