#include <stdio.h> #include <iostream> using namespace std; int main(void) { int x = 5; int y = 2; char op = '*'; switch (op) { default : x += 1; case '+' : x += y; case '-' : x -= y; } cout <<x; return 0; }
Standard input is empty
6
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!