2005年09月24日

轉轉轉....

import java.util.Scanner;
public class Ex2_25
 {
 public static void main(String args[])
  {
  Scanner input = new Scanner( System.in );
  int number;
  System.out.print("Enter the integer:");
  number = input.nextInt();
  if (number % 2 == 1 )
   {
   System.out.printf("%d is an odd", number);
   }
   else
    {
    System.out.printf("%d is an even", number);
    }
  }
 }

這是最近在High的Java咖啡語言...

現在很慶幸高中老師有敎過C語言,不然這部分我一定也是睡死..= =

嗯.....

趕作業去|||||


Posted by kevingao814 at 樂多Roodo! │10:37 │回應(0)引用(0)├寫囧興
工具:編輯本文
Ads by Roodo! 

引用URL

http://cgi.blog.roodo.com/trackback/1005079