Go 关系运算符

package main

import "fmt"

func main() {

   var a int = 21

   var b int = 10

   if( a == b ) {

      fmt.Printf("Line 1 - a is equal to b\n" )

   } else {

      fmt.Printf("Line 1 - a is not equal to b\n" )

   }

   if ( a < b ) {

      fmt.Printf("Line 2 - a is less than b\n" )

   } else {

      fmt.Printf("Line 2 - a is not less than b\n" )

   }

   if ( a > b ) {

      fmt.Printf("Line 3 - a is greater than b\n" )

   } else {

      fmt.Printf("Line 3 - a is not greater than b\n" )

   }

   /* Lets change value of a and b */

   a = 5

   b = 20

   if ( a <= b ) {

      fmt.Printf("Line 4 - a is either less than or equal to  b\n" )

   }

   if ( b >= a ) {

      fmt.Printf("Line 5 - b is either greater than  or equal to b\n" )

   }

}

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

最新文章

  1. R for循环之break,next
  2. [Asp.net MVC]Asp.net MVC5系列——从控制器访问模型中的数据
  3. Python MySQL ORM QuickORM hacking
  4. Android模仿QQ空间图片上传——原理
  5. 深度神经网络如何看待你,论自拍What a Deep Neural Network thinks about your #selfie
  6. 关于ecshop中jquery与js冲突解决的方案
  7. 【Mysql 调用存储过程,输出参数的坑】
  8. unicode编码相互转换加密解密
  9. SQL——找出某一字段中内容相同的数据
  10. vscode1.30.1使用的electron3.0.10中的bug
  11. 斐讯K2 22.5.9固件刷华硕固件实测教程
  12. 汇编实验1(又是作业emm)
  13. 操作循环的关键字switch,break,return的应用及区别
  14. 修改centos 7 系统时间
  15. [LeetCode&amp;Python] Problem 697. Degree of an Array
  16. springboot logback
  17. 全网最详细的用pip安装****模块报错:Could not find a version that satisfies the requirement ****(from version:) No matching distribution found for ****的解决办法(图文详解)
  18. 【bzoj3224】 Tyvj1728—普通平衡树
  19. 【Ubuntu】VirtualBox 您没有查看“sf_VirtualDisk”的内容所需的权限。
  20. 【转】ECharts3.x中的点击事件与行为

热门文章

  1. 使用truelicense实现用于JAVA工程license机制(包括license生成和验证)
  2. element-ui中table渲染的快速用法
  3. k8s-1.16 二进制安装
  4. redis怎么实现FIFO队列思想
  5. linux POSIX信号量
  6. 模拟+细节题——cf1236D
  7. RVIZ可视化平台
  8. 在使用element-ui搭建的表格中,实现点击&quot;定位&quot;按钮后,屏幕滚动到对应行的位置
  9. vue 和 react 常用包(插件、组件 或 工具)
  10. LYOI2018 Hzy&#39;s Planets