Answers for "how to input in dart in integer"

0

Dart integer User input

import 'dart:io';

void main() {
  int value = stdin.readIntSync();
  print(value);
}

extension ReadIntSyncOnStdin on Stdin {
  int readIntSync() => int.parse(this.readLineSync());
}
Posted by: Guest on June-05-2021
1

how to take integer input from user in dart

import 'dart:io';

void main() {
  print("Enter a number..");
    var number = stdin.readLineSync();
    var intNumber= int.parse(number);
    print(intNumber);
}
Posted by: Guest on May-21-2021

Code answers related to "how to input in dart in integer"

Browse Popular Code Answers by Language