Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine("nested if");
- int c = 10;
- int d = 8;
- if (c > 9)
- if(d > 9)
- {
- Console.WriteLine("result 1");
- }
- else
- {
- Console.WriteLine("result 2");
- }
- if (c > 9)
- {
- if(d > 9)
- Console.WriteLine("result 1");
- }
- else
- {
- Console.WriteLine("result 2"); //why don't two 'result 2's appear ?
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement