Please help me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help me

package input.pkg1; import java.util.Scanner ; public class Input1 { public static void main(String[] args) { int number1, number2, total; Scanner Info = new Scanner (System.in); System.out.println("Enter First Number: "); number1 = Info.nextInt(); System.out.println("Enter Second Number: "); number2 = Info.nextInt(); total= number1 +number2; System.out.println("Total = "+ total); Info.close();

4th Jun 2023, 12:11 AM
Moneerah Alqahtani
3 Answers
+ 5
Moneerah Alqahtani That said: 1. What is the line "package input.pkg1;" for? 2. Review the lesson on formatting output.
4th Jun 2023, 2:12 AM
Emerson Prado
Emerson Prado - avatar
+ 4
Moneerah Alqahtani Your question is missing vital information for us to help you. Pls edit your question description and add: 1. A tag with the language name 2. A description of the task 3. A link to your code in Code Playground 4. An explanation of your difficulties This way, we'll know what you're trying to do and what to help you in.
4th Jun 2023, 2:09 AM
Emerson Prado
Emerson Prado - avatar
+ 3
Moneerah Alqahtani the code is missing two closing braces - one for main() and one for class Input1. I am not familar with the package keyword, but the warning goes away if you comment out that line.
4th Jun 2023, 12:34 AM
Brian
Brian - avatar