Check out example codes for "CalculoIVE java". It will help you in understanding the concepts better.

Code Example 1

import java.util.Scanner;

public class CalculoIVE {

	public static void main(String[] args) {
		Scanner teclado = new Scanner(System.in);
		
		//D
		
		double prezo = 0;
		double ive = 0;
		double pfinal = 0;
		
		//E
		
		System.out.println("Introduza prezo sen IVE (€) : ");
			prezo = teclado.nextDouble();
		
		System.out.println("Introduza IVE (%) : ");
			ive = teclado.nextDouble();
		
		//P
		
		pfinal = prezo * (1 + (ive / 100));
		
		//S
		
		System.out.println("Importe con IVE = " + pfinal + "€");

	}

}

Learn ReactJs, React Native from akashmittal.com