- 1

Estoy empezando de nuevo y estoy perdido

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); //obtener los salarios int salary1 = scanner.nextInt(); int salary2 = scanner.nextInt(); //tu código va aquí int total = salary1 + salary2 ; System.out.println("total"); } }

24th Jun 2021, 7:46 PM
Cristian Endara
Cristian Endara - avatar
2 Respostas
+ 3
Cristian I am assuming that you want the the result of the sum here: just write -> total instead " total " .
24th Jun 2021, 7:52 PM
JRAMAHES
JRAMAHES - avatar
0
Cristian Endara Remember when you write anything inside double quotes that would be String but you need to print numeric value so just print total.
24th Jun 2021, 7:55 PM
A͢J
A͢J - avatar