Write a Dart program that takes an age (for example 20) as input and prints something as "You look older than 20".

Code:

import 'dart:io';

void main() {
  print('Input age : ');
  int x = int.parse(stdin.readLineSync());
  print('You look older than $x');
}


Output:

Comments

Popular posts from this blog

Write a Dart program to convert from celsius degrees to Kelvin and Fahrenheit.

Write a Dart program to create a new string from a given string (length 1 or more ) with the first character added at the front and back.