Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions week 3/Exercise 3.4.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,13 @@ static int multiply(int a, int b){ //static method
public class Test3{
public static void main( String[] args ) {
Scanner sc = new Scanner(System.in);
int n1=sc.nextInt();
int n2=sc.nextInt();
int n1=sc.nextInt();
int n2=sc.nextInt();
QuestionScope q = new QuestionScope();
//Called the method sum() to find the sum of two numbers.
QuestionScope q = new QuestionScope();
int sum;
sum= q.sum(n1,n2);
System.out.println(q.sum(n1,n2))
//Called the method multiply() to find the product of two numbers.
int multy= q.multiply(n1,n2);
System.out.println(sum);
System.out.print(multy);
System.out.print(q.multiply(n1,n2));

}
}
}