// example.dart

// Importing a library
import 'dart:io';

// Main function - entry point of the program
void main() {
  print('Hello, Dart!');

  // Asking for user input
  stdout.write('Enter your name: ');
  String? name = stdin.readLineSync(); // Reads a line from console

  // Using null check and string interpolation
  if (name != null && name.isNotEmpty) {
    print('Welcome, $name!');
  } else {
    print('You did not enter a name.');
  }

  // Simple loop example
  for (int i = 1; i <= 5; i++) {
    print('Counting: $i');
  }
}