#include <stdio.h>
int main( ) {
int i = 0 ;
int a = 10 ;
int b = 20 ;
int f;
float g;
char ch;
for ( int i = 0 ; i < 5 ; i++ ) {
printf ( "Enter math operation: \n " ) ;
switch ( ch) {
case '+' :
f = a + b;
break ;
case '-' :
f = a - b;
break ;
case '*' :
f = a * b;
break ;
case '/' :
g = ( float ) a / ( float ) b;
break ;
case '%' :
f = a % b;
break ;
default :
break ;
}
}
return 0 ;
}
CiNpbmNsdWRlIDxzdGRpby5oPgoKaW50IG1haW4oKSB7CgkKCWludCBpID0gMDsKCWludCBhID0gMTA7CglpbnQgYiA9IDIwOwoJaW50IGY7CglmbG9hdCBnOwoJY2hhciBjaDsKCQoJZm9yIChpbnQgaSA9IDA7IGkgPCA1OyBpKyspIHsKCQkKCQlwcmludGYoIkVudGVyIG1hdGggb3BlcmF0aW9uOiBcbiIpOwoJCXNjYW5mKCIlY1xuIiwgJmNoKTsKCQkKCQlzd2l0Y2ggKGNoKSB7CgkJCQoJCQljYXNlICcrJzoKCQkJCWYgPSBhICsgYjsgCgkJCQlwcmludGYoImYgPSAlZFxuIiwgZik7CgkJCQlicmVhazsKCQkJY2FzZSAnLSc6CgkJCQlmID0gYSAtIGI7IAoJCQkJcHJpbnRmKCJmID0gJWRcbiIsIGYpOwoJCQkJYnJlYWs7CgkJCWNhc2UgJyonOgoJCQkJZiA9IGEgKiBiOyAKCQkJCXByaW50ZigiZiA9ICVkXG4iLCBmKTsKCQkJCWJyZWFrOwoJCQljYXNlICcvJzoKCQkJCWcgPSAoZmxvYXQpYSAvIChmbG9hdCliOyAKCQkJCXByaW50ZigiZiA9ICVmXG4iLCBnKTsKCQkJCWJyZWFrOwoJCQljYXNlICclJzoKCQkJCWYgPSBhICUgYjsKCQkJCXByaW50ZigiZiA9ICVkXG4iLCBmKTsKCQkJCWJyZWFrOwoJCQlkZWZhdWx0OgoJCQkJcHJpbnRmKCJpbnZhbGlkIG9wZXJhdG9yXG4iKTsKCQkJCWJyZWFrOwoJCX0KCgl9CgogICAgcmV0dXJuIDA7Cn0KCg==