write a dart program that asks the user to enter their name and their age. Print out a message that tells how many years they have to be 100 years old
- برمجة dart
- برمجة
- 2022-01-31
- roaasyrin97465155518
الأجوبة
import 'dart:io';
void main() {
stdout.write("What's your name? ");
String name = stdin.readLineSync()!; //Null Safety
print("Hi, $name! What is your age?");
int age = int.parse(stdin.readLineSync()!); //Null Safety
int yearsToHunderd = 100 - age;
print("$name, You have $yearsToHunderd years to be 100");
}
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة