0
Java 6.4 "Drawing Class"... multiplication
im not understanding what im doing wrong. I'm stuck on two error codes. ".class" and "not a statement" if anyone has tips that would be great. CodeCoach Practice: Question You need to calculate how many pencils are in the classroom. You're given code which takes as input the number of students and the number of pencils each of them has. Task Calculate and output the total number of pencils. Sample Input 11 3 Sample Output 33 in java: import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner myObj = new Scanner(System.in); int pupils = myObj.nextInt(); int pencils = myObj.nextInt(); //your code goes here } }
3 ответов
+ 1
So far, it doesn't look like you've done anything.
0
//your code goes here
int total = pupils * pencils;
System.out.println(total);
0
Int total = pupils * pencils;
System.out.println(total);