import java.util.Scanner;

public class TypeConversion {
    public static void main (String args[]){
        Scanner sc = new Scanner(System.in);

        System.out.println("Enter an integer value: ");
        int a = sc.nextInt();

        System.out.println("Enter a decimal value:");
        double b = sc.nextDouble();

        System.out.println("Enter a letter:");
        char c = sc.next().charAt(0);

        // int to byte
        byte d = (byte) a;
        System.out.println("Converting the given integer into a byte value, we get: "+d);

        // char to int
        int e = (int) c;
        System.out.println("Converting the given character into an int value, we get: "+e);

        // double to byte
        byte f = (byte) b;
        System.out.println("Converting the given double value into a byte value, we get: "+f);

        // double to int
        int g = (int) b;
        System.out.println("Converting the given double value into an int value, we get: "+g);

    }
    
}
