what is the output
int n=2;
switch (n)
{
case 1 : n=n+1;
break;
case 2 : n = n+1;
case 4 : n = n + n;
default : n = n – 1;
}
cout<<”The value of n is “<<n<<endl;
can you tell me the value of n because i seem to get an error
It seems each case is missing a certain keyword.
Wazzak
Topic archived. No new replies allowed.