if语句 if ...: pass elif ...: pass else: pass for循环 for i in range(10): print(i) while循环 while True: if ...: pass else: break break.continue break,跳出整个循环 continue,跳出当次循环继续下次循环 三元运算 a=1 b=2 c=3 d = a if a > b else
在java中,简单的浮点类型float和double是不能够进行运算.我们先看下面的两个程序代码: 代码一: import java.util.Scanner; class Circle { double radius; static final double PI=3.14; public Circle(){this.radius=0;} public Circle(double r){this.radius=r;} public double getArea(){return PI*this