Write a dart program to print the result of the specified operations.

Test data:

  • -1 + 4 * 6
  • ( 35+ 5 ) % 7
  • 14 + -4 * 6 / 11
  • 2 + 15 / 6 * 1 - 7 % 2

Expected Output:
23
5
12
3

Code:

void main() {
  print(-1 + 4 * 6);
  print((35 + 5) % 7);
  print(14 + -4 * 6 / 11.round());
  print(2 + 15 / 6 * 1 - 7 % 2);
}


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