#12486: java


zzser15963 (Momentary)

School : 國立新營高級中學
ID : 57840
IP address : [39.12.231.61]
Last Login :
2018-07-22 12:48:36
a065. 提款卡密碼 -- 板橋高中教學題 | From: [36.233.7.222] | Post Date : 2017-07-29 16:53

package test;

import java.util.Scanner;

public class pratice {

public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner (System.in) ;

String str =null ;
char [] word ;
while(in.hasNext()){
str = in.next() ;
word = str.toCharArray();
for(int i =1;i<word.length;i++){
System.out.print(Math.abs((int) word[i]-word[i-1]));
}
System.out.println();
}
in.close();
}

}

 
ZeroJudge Forum