Write a dart program that takes a number as input and print its multiplication table.

Code:

import 'dart:io';

void main() {
  print('Input  Number : ');
  int a = int.parse(stdin.readLineSync());
  for (int i = 1; i <= 10; i++) {
    print('$a x $i = ${a * i}');
  }
}

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 check two given integers and return true if one is negative and one is positive

Write a Dart program to compute the sum of two given integers, if two values are equal then return the triple of their sum