Este no me compila alguien me puede ayudar por favor no se donde esta el error | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Este no me compila alguien me puede ayudar por favor no se donde esta el error

import Java.util.Scanner; public class EjercicioOnce { public static void main(String[] args); { Scanner leer = new Scanner(Systen.in); Int valorA; Int valorB; Int resultado; System.out.print("Ingrese el valor de A"); ValorA = leer.NextInt(); System.out.print("Ingrese el Valor de B"); ValorB = leer.NextInt(); if (valor A > valor B) ( Systen.Out.print("El mayor es A"); ) else ( System.out.print("El mayor es B"); ) } }

3rd Sep 2018, 5:12 PM
Cristian Silva
Cristian Silva - avatar
1 Answer
0
There were typo in the code, also, mind that Java is a case sensitive language, you need to pay attention to write the code with correct case; e.g. 'int' is different with 'Int' import java.util.Scanner; public class EjercicioOnce { public static void main(String[] args) { Scanner leer = new Scanner(System.in); int valorA; int valorB; System.out.print("Ingrese el valor de A: "); valorA = leer.nextInt(); System.out.println(valorA); System.out.print("Ingrese el Valor de B: "); valorB = leer.nextInt(); System.out.println(valorB); if (valorA > valorB) { System.out.print("El mayor es A"); } else { System.out.print("El mayor es B"); } } }
3rd Sep 2018, 5:41 PM
Ipang