正在加载图片...
if.else example 如果半径大于0,则计算并显示圆的面积,否则提示无效输入。 if (radius > 0) area radius*radius*PI System. out. println ("The area for the +circle of radius n radius n is area)i else System. out. println("Negative input")iif...else Example 如果半径大于0,则计算并显示圆的面积,否则提示无效输入。 if (radius >= 0) { area = radius*radius*PI; System.out.println("The area for the “ + “circle of radius " + radius + " is " + area); } else { System.out.println("Negative input"); }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有