Skip to content

Commit 339006e

Browse files
Merge branch 'main' into Conditionals_And_Loops
2 parents 34e002a + 5a38234 commit 339006e

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

‎src/Assignments/Problems.java‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package Assignments;
22

3+
import java.text.DecimalFormat;
34
import java.util.Scanner;
45
import java.math.RoundingMode;
56
import java.text.DecimalFormat;
67

7-
import static java.lang.System.*;
8+
import static java.lang.System.in;
9+
import static java.lang.System.out;
810

911
public class Problems {
1012

13+
private static final DecimalFormat df = new DecimalFormat("0.00");
1114
static Problems problems = new Problems();
1215
private static final DecimalFormat df = new DecimalFormat("0.00");
1316

@@ -19,15 +22,15 @@ public static void main(String[] args) {
1922
// problems.computeWithFormula();
2023
}
2124

22-
void getCurrencyInDollars(){
2325

24-
Scanner firstInput = new Scanner(in);
26+
void getCurrencyInDollars(){
27+
Scanner firstInput = new Scanner(in);
2528
out.println("Enter Rupees: ");
26-
double indianCurrency = firstInput.nextDouble();
29+
double indianCurrency = firstInput.nextDouble();
2730

28-
double dollarCurrency = indianCurrency/74.42;
31+
double dollarCurrency = indianCurrency/74.42;
2932
out.println("Value in Dollars is "+ df.format (dollarCurrency) + "$");
30-
}
33+
}
3134

3235
void findLargestNumber(){
3336
Scanner firstInput = new Scanner(in);

0 commit comments

Comments
 (0)