DEV Community

Cover image for Nested if-else
Coder
Coder

Posted on

Nested if-else

void main() {
  print('Om Namah Shivay');
  //   nested if -else
  int age = 16;
  if (age == 15) {
    print('age = 15');
  } else if (age == 16) {
    print('age = 16');
  } else {
    print('That person neither born  nor die.');
  }
}

Enter fullscreen mode Exit fullscreen mode

I understood

Top comments (0)