import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        
    //   Scanner TTS = new Scanner(System.in);

    //     int TTFB = 40;

    //     int NOMAS = TTS.nextInt();
    //     int NOMRFB = TTFB - NOMAS;

    //     System.out.println(NOMRFB);
    
        Scanner scn = new Scanner(System.in);
    
        double a1 = scn.nextDouble();
        double a2 = scn.nextDouble();
        double a3 = scn.nextDouble();
        double a4 = scn.nextDouble();
        
        double x = (double)a1 + (double)a2 + (double)a3 + (double)a4;
        
        System.out.println("Number 1: " + a1);
        System.out.println("Number 2: " + a2);
        System.out.println("Number 3: " + a3);
        System.out.println("Number 4: " + a4);
        System.out.println("The Total of all Numbers is: " + x);
        
    }
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: