Dart编程实例 - 相等和关系操作符

void main() {

   var num1 = 5;

   var num2 = 9;

   var res = num1>num2;

   print('num1 greater than num2 ::  ' +res.toString());

   res = num1<num2;

   print('num1 lesser than  num2 ::  ' +res.toString());

   res = num1 >= num2;

   print('num1 greater than or equal to num2 ::  ' +res.toString());

   res = num1 <= num2;

   print('num1 lesser than or equal to num2  ::  ' +res.toString());

   res = num1 != num2;

   print('num1 not equal to num2 ::  ' +res.toString());

   res = num1 == num2;

   print('num1 equal to num2 ::  ' +res.toString());

}

本文转自:http://codingdict.com/article/23407

Dart编程实例 - 相等和关系操作符的更多相关文章

  1. Dart编程实例 - 类型测试操作符 is!

    Dart编程实例 - 类型测试操作符 is! void main() { double n = 2.20; var num = n is! int; print(num); } 本文转自:http:/ ...

  2. Dart编程实例 - 类型测试操作符is

    Dart编程实例 - 类型测试操作符is void main() { int n = 2; print(n is int); } 本文转自:http://codingdict.com/article/ ...

  3. Dart编程实例 算术操作符

    Dart编程实例 算术操作符 void main() { var num1 = 101; var num2 = 2; var res = 0; res = num1+num2; print(" ...

  4. Dart编程实例 - Const 关键字

    Dart编程实例 - Const 关键字 void main() { final v1 = 12; const v2 = 13; v2 = 12; } 本文转自:http://codingdict.c ...

  5. Dart编程实例 - Final 关键字

    Dart编程实例 - Final 关键字 void main() { final val1 = 12; print(val1); } 本文转自:http://codingdict.com/articl ...

  6. Dart编程实例 - Dynamic 关键字

    Dart编程实例 - Dynamic 关键字 void main() { dynamic x = "tom"; print(x); } 本文转自:http://codingdict ...

  7. Dart编程实例 - Dart 面向对象编程

    Dart编程实例 - Dart 面向对象编程 class TestClass { void disp() { print("Hello World"); } } void main ...

  8. Dart编程实例 - Enabling Checked Mode

    Dart编程实例 - Enabling Checked Mode void main() { int n="hello"; print(n); } 本文转自:http://codi ...

  9. Dart编程实例 - 第一个Dart程序

    Dart编程实例 - 第一个Dart程序 main() { print("Hello World!"); } 本文转自:http://codingdict.com/article/ ...

随机推荐

  1. Mysql 数据库默认值选 ''" 、Null和Empty String的区别

    两者的查询方式不一样:NULL值查询使用is null/is not null查询,而empty string可以使用=或者!=.<.>等算术运算符,这点算是最主要的区别了. 对于myis ...

  2. 玩玩Mybatis的逆向工程

    通过数据库 逆向生成代码 主要配置的文件: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ...

  3. Java实现按汉语拼音的排序

    public class sortByPinyin { public static void main(String[] args) { String[] arr = { "刘刘" ...

  4. hibernate 双向1对多

    1: 还是用客户Customer和订单Order来解释: “一对多”的物理意义:一个客户可以有多个订单,某个订单只能归宿于一个客户. “双向”的物理意义:客户知道自己有哪些订单,订单也知道自己归宿于哪 ...

  5. SPOJ LEXSTR 并查集

    题目描述: Taplu and Abhishar loved playing scrabble. One day they thought of inventing a new game using ...

  6. CF1061E Politics E. Politics 解题报告

    CF1061E Politics E. Politics 考虑利用树的性质,因为是子树问题,所以放到dfs序上. 只考虑一个树,问题是每个区间选恰好\(k\)个.因为区间其实是子树,所以区间要么包含, ...

  7. JS-模拟printf

    function printf(){ var args = [].slice.call(arguments), fmt = args.shift(), args_index = 0; ///%(填充的 ...

  8. 7.使用mysql_export监控mysql

    ok,docker监控,宿主机CPU.磁盘.网络.内存监控我们都已讲过,是时候讲一波mysql监控了.本次mysql部署在客户端. 架构 客户端 MySql安装 ##下载mysql的repo源: [r ...

  9. PAT_A1037#Magic Coupon

    Source: PAT A1037 Magic Coupon (25 分) Description: The magic shop in Mars is offering some magic cou ...

  10. ES6 基础内容介绍

    参考博客: https://www.cnblogs.com/libin-1/p/6716470.html 一.新的变量声明方式 let/const 与var不同,新的变量声明方式带来了一些不一样的特性 ...