forked from mrizky-kur/Redux-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Day_5.java
31 lines (24 loc) · 1.01 KB
/
Day_5.java
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
package com.TrX;
import java.util.*;
import java.text.*;
public class Day_5 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter the Amount: ");
double payment = scanner.nextDouble();
scanner.close();
// Write your code here.
NumberFormat f1 = NumberFormat.getCurrencyInstance(Locale.US);
NumberFormat f2 = NumberFormat.getCurrencyInstance(new Locale("en", "IN"));
NumberFormat f3 = NumberFormat.getCurrencyInstance(Locale.CHINA);
NumberFormat f4 = NumberFormat.getCurrencyInstance(Locale.FRANCE);
String us = f1.format(payment);
String india = f2.format(payment);
String china = f3.format(payment);
String france = f4.format(payment);
System.out.println("US: " + us);
System.out.println("India: " + india);
System.out.println("China: " + china);
System.out.println("France: " + france);
}
}