![iamsecond235p318rq](/avatars/31654.jpg)
iamsecond235p318rq
24.10.2020 •
Computers and Technology
[JAVA] Write a program that reads a number between 1,000 and 999,999 from the user and prints it with a comma separating the thousands.
Here is a sample dialog;
Please enter an integer between 1000 and 999999: 23456
Output: 23,456
Solved
Show answers
More tips
- C Computers and Internet Why is Yandex s robot Bless.yandex.ru Important?...
- S Science and Technology How to Restore the Diamond Shine to Your Tarnished Silverware...
- C Computers and Internet What Are Peers and Seeds in Torrenting?...
- L Leisure and Entertainment How to Find a Phone Number by Address: The Ultimate Guide...
- F Food and Cooking Pu-erh Tea: History, Varieties, Benefits, and Risks...
- S Style and Beauty Why is Sugaring Better than Waxing for Hair Removal?...
- C Computers and Internet How to Delete a Page on VKontakte: The Ultimate Guide from Experts...
- F Food and Cooking How to Make Delicious Plov: Secrets and Recipes...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- L Leisure and Entertainment Unlocking the Secrets of Winning the Lottery...
Answers on questions: Computers and Technology
- C Computers and Technology What entity implements policies concerning the availability of money and its cost?...
- E English Students can play volley ball now (yes\no questions )...
- M Mathematics Please help, will mark brainiest...
- S Social Studies How did nationalism play in the starting of WW1? - answered in 2-3 sentences...
Ответ:
import java.util.Scanner;
public class Comma {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("please enter an ineger between 1,000 and 999,999");
String number = input.nextLine();
System.out.println(number.replace(",", ""));
}
}
Explanation:
here is the solution
Ответ: