BAEL-2797 new domain "math"created, sections moved
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.algorithms.primechecker;
|
||||
package com.baeldung.math.primechecker;
|
||||
|
||||
import java.math.BigInteger;
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.algorithms.primechecker;
|
||||
package com.baeldung.math.primechecker;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.algorithms.primechecker;
|
||||
package com.baeldung.math.primechecker;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.algorithms.primechecker;
|
||||
package com.baeldung.math.primechecker;
|
||||
|
||||
public interface PrimeChecker <T> {
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.baeldung.algorithms.primechecker;
|
||||
package com.baeldung.math.primechecker;
|
||||
|
||||
import org.apache.commons.math3.primes.Primes;
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.baeldung.percentage;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class PercentageCalculator {
|
||||
|
||||
public double calculatePercentage(double obtained,double total){
|
||||
return obtained*100/total;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
PercentageCalculator pc = new PercentageCalculator();
|
||||
Scanner in = new Scanner(System.in);
|
||||
System.out.println("Enter obtained marks:");
|
||||
double obtained = in.nextDouble();
|
||||
System.out.println("Enter total marks:");
|
||||
double total =in.nextDouble();
|
||||
System.out.println("Percentage obtained :"+pc.calculatePercentage(obtained,total));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user