-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSolveCient.java
More file actions
45 lines (30 loc) · 742 Bytes
/
Copy pathSolveCient.java
File metadata and controls
45 lines (30 loc) · 742 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
36
37
38
39
40
41
42
43
44
45
package br.com.bb.Calc;
import java.math.BigDecimal;
public class SolveCient extends Solve{
SolveCient(Operacoes ope)
{
super(ope);
}
public void demorou()
{
System.out.println("só demoramos um pouco");
}
public void fatorial(int a)
{
for (int i = a-1; i>0; i--)
{
a=a*i;
}
System.out.println("Solução: " + a);
}
public Double pow(Double numerador, int expoente) {
Double inicial = numerador;
if (!(expoente == 1)) {
for (int i = 1; i < expoente; i++) {
numerador = inicial * numerador;
}
return numerador;
}
return numerador;
}
}