Java - 輸入八個整數做右列 其結果為何 ?
輸入八個整數做右列 其結果為何 ?
a*b%c|d*e^f*g-h>>>1
a=5 b=8 c=6 d=9 e=7 f=3 g=5 h=2
a*b%c|d*e^f*g-h>>>1
a=5 b=8 c=6 d=9 e=7 f=3 g=5 h=2
- import java.util.*;
- public class Java_Input_8_number
- {
- public static void main(String[] args)
- {
- // TODO 自動產生的方法 Stub
- Scanner scan = new Scanner(System.in);
- System.out.print("請輸入 a b c d e f g h (以空白分隔:)");
- int a, b, c, d, e, f, g, h;
- a = scan.nextInt();
- b = scan.nextInt();
- c = scan.nextInt();
- d = scan.nextInt();
- e = scan.nextInt();
- f = scan.nextInt();
- g = scan.nextInt();
- h = scan.nextInt();
- int num = a * b % c | d * e ^ f * g - h >>> 1;
- System.out.println(num);
- }
- }
留言
張貼留言