-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmethods_22.java
More file actions
34 lines (28 loc) · 837 Bytes
/
Copy pathmethods_22.java
File metadata and controls
34 lines (28 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package Java_practice;
public class methods_22 {
static int Logic_Multiplication(int x, int y) // method to calculate the multiplication of 2 Interview_Extract_Number_Add_Them
{
int z=x*y;
return z;
}
static int Logic_Dividation(int q, int r) // method to calculate the Dividation of 2 Interview_Extract_Number_Add_Them
{
int p=q*r;
return p;
}
public static void main(String[] args) { // Main Method
int a=45;
int b=37;
int c=0;
if(a<b)
{
c= Logic_Multiplication(a,b); //logic_Multiplication method used here
System.out.println(c);
}
else
{
c=Logic_Dividation(a,b); //logic_Dividation method used here
System.out.println(c);
}
}
}