Skip to content

Instantly share code, notes, and snippets.

@axurright
Last active November 10, 2024 19:02
Show Gist options
  • Select an option

  • Save axurright/3ded0135977b8f182f1e0b77757b89ce to your computer and use it in GitHub Desktop.

Select an option

Save axurright/3ded0135977b8f182f1e0b77757b89ce to your computer and use it in GitHub Desktop.
A simple calculator (that only does sums) in Dart
import 'dart:io';
void main() {
print("First number: ");
firstNumber = stdin.readLineSync();
print("Reading...");
sleep(Duration(seconds: 1));
print("Done!");
print("Second number: ");
secondNumber = stdin.readLineSync();
print("Reading...");
sleep(Duration(seconds: 1));
print("Done! Your result: ");
totalSum = firstNumber + secondNumber;
print(totalSum);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment