-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSi.java
More file actions
35 lines (35 loc) · 682 Bytes
/
Copy pathSi.java
File metadata and controls
35 lines (35 loc) · 682 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
35
import java.util.Scanner;
class interest{
int p,n,r;
double si;
void getvalue()
{
System.out.println("enter the p,n,r value");
Scanner sc=new Scanner(System.in);
p=sc.nextInt();
n=sc.nextInt();
r=sc.nextInt();
}
}
class sim extends interest {
void calculate()
{
si=(p*n*r)/100;
}
}
class simple extends sim{
void display()
{
System.out.println("the si is"+si);
}
}
public class Si {
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
simple a =new simple();
a.getvalue();
a.calculate();
a.display();
}
}