
public class ASCII {
	public static void main(String args[]) {
		new ASCII();
	}
	public ASCII() {
		//convert to ASCII
		String w = "What a Nice Day to Code a Program";
		String s = w.toLowerCase();
		for(int i=0; i<s.length(); i++) {
			if(s.charAt(i)==' ')
				System.out.print("   ");
			else
				System.out.print((int)s.charAt(i)+ " ");
		}
		
		s = "Zebras run in the grass. Yahoo! Run zebra run. ";
		System.out.println();
		//Caesar shift
		for(int i=0; i<s.length(); i++) {
			int value= (int) s.charAt(i);
			char next=(char) (value+1);
			if(value <65 || (value>90 && value<97) || value>122)
				next=s.charAt(i);
			else if(s.charAt(i)=='z')
				next='a';
			else if(s.charAt(i)=='Z')
				next='A';

			System.out.print(next+"");
		}
	}
}
