⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 temptable.txt

📁 java的一经典教程
💻 TXT
字号:
// Program to output a table of Celsius and Fahrenheit temperatures
// from -10 to +10

public class TempTable
{
   public static void main(String[] args)
   {
      final double FACTOR = 9.0/5.0;
      // ratio of F degree to C degree
      final double SHIFT = 32;  // 0 C = 32 F
      final int START = -10;
   	  final int FINISH = 10;

      int thisTemp = START;
      double thisInFahrenheit;

      // print table headings
      System.out.println("Celsius Fahrenheit");

      // print table rows
      while (thisTemp <= FINISH)
      {
          thisInFahrenheit = thisTemp * FACTOR + SHIFT;

          System.out.println(thisTemp + "       " +
             thisInFahrenheit);

          thisTemp++;
      }
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -