#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
/* local variable definition */
char grade = 'B';
switch( grade ) {
case 'A':
NSLog(@"Excellent!\n" );
break;
case 'B':
case 'C':
NSLog(@"Well done\n" );
break;
case 'D':
NSLog(@"You passed\n" );
break;
case 'F':
NSLog(@"Better try again\n" );
break;
default:
NSLog(@"Invalid grade\n" );
}
NSLog(@"Your grade is %c\n", grade );
return 0;
}
I2ltcG9ydCA8Rm91bmRhdGlvbi9Gb3VuZGF0aW9uLmg+CgppbnQgbWFpbihpbnQgYXJnYywgY29uc3QgY2hhciAqIGFyZ3ZbXSkgewogICAgLyogbG9jYWwgdmFyaWFibGUgZGVmaW5pdGlvbiAqLwogICAgY2hhciBncmFkZSA9ICdCJzsKICAgIHN3aXRjaCggZ3JhZGUgKSB7CiAgICAgICAgY2FzZSAnQSc6CiAgICAgICAgICAgIE5TTG9nKEAiRXhjZWxsZW50IVxuIiApOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdCJzoKICAgICAgICBjYXNlICdDJzoKICAgICAgICAgICAgTlNMb2coQCJXZWxsIGRvbmVcbiIgKTsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgY2FzZSAnRCc6CiAgICAgICAgICAgIE5TTG9nKEAiWW91IHBhc3NlZFxuIiApOwogICAgICAgICAgICBicmVhazsKICAgICAgICBjYXNlICdGJzoKICAgICAgICAgICAgTlNMb2coQCJCZXR0ZXIgdHJ5IGFnYWluXG4iICk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgIE5TTG9nKEAiSW52YWxpZCBncmFkZVxuIiApOwogICAgfQogICAgTlNMb2coQCJZb3VyIGdyYWRlIGlzICVjXG4iLCBncmFkZSApOwogICAgcmV0dXJuIDA7Cn0=