Question: Integers numClasses and numSemesters are read from input representing the number of classes per semester and the number of semesters a student takes, respectively. Assign

Integers numClasses and numSemesters are read from input representing the number of classes per semester and the number of semesters a student takes, respectively. Assign integer totalClasses with the total number of classes the student has taken.
Ex: If the input is 79, then the output is:
63
import java.util.Scanner;
public class StudentDetails {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int numClasses;
int numSemesters;
int totalClasses;
numClasses = scnr.nextInt();
numSemesters = scnr.nextInt();
System.out.println(totalClasses);
}
}
\
how do i get the complete code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!