1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Jobisdone [24]
3 years ago
13

Write a program (C++) that reads a number between 1,000 and999,999 from the user where the user enters a comma in the input.Then

print the number without a comma. EXAMPLE:Here is a sample dialog, the user input is in italics.
Computers and Technology
1 answer:
mr Goodwill [35]3 years ago
7 0

<u>C++ program to print the digit without a comma </u>

#include<iostream>

#include<string>

using namespace std;

void commaremoval(string num)  /*Defining function commaremoval with parameter num of string type*/

{  

string  s=num;

for(int i=0; i< s.length();i++)

   {

    if(s[i]!=',') /*Checking whether the string doesn't contain ' ,' */

       cout<<s[i];  //Printing Output without comma

   }  

}

//driver function

int main()

{

string num;

cout<<"Enter a digit between 1,000 and 999,999:"<<endl; /*taking input from user*/

cin>>num;

commaremoval(num); //calling function

return 0;

}

<u>Output</u>

Enter a digit between 1,000 and 999,999:  22,343

22343

You might be interested in
What is website and what are the difference between website and blog pls anyone​
klemol [59]
A website is a site that contains information for the readers while a blog goes towards followers or viewers
5 0
3 years ago
Read 2 more answers
What's the best definition of financial literacy?
8090 [49]

Answer:

defines personal financial literacy as "the ability to use knowledge and skills to manage financial resources effectively for a lifetime of financial well-being.\

Explanation: thats it

5 0
3 years ago
Two friends can share 100 songs from their Bluetooth enabled mobile devices
Umnica [9.8K]

Answer:

A

Explanation:

If they are connected via bluetooth, you can share unlimited amounts of anything.

6 0
3 years ago
. Here is a sequence of addresses during execution of some program: 4, 16, 0, 20, 52, 68, 172, 64 Assuming a fully associative c
k0ka [10]

Answer:

See explaination for the illustrations on the question.

Explanation:

A program cache miss usually occurs at the instance of an instruction fetch failing to read an instruction from the program cache and the processor is required to access the instruction from the next level of memory. A request to L2 or external memory has a much higher latency than an access from the first level instruction cache.

A cache on its own can be defined as is a hardware cache used by the central processing unit (CPU) of a computer to reduce the average cost (time or energy) to access data from the main memory.

Please kindly check attachment for the step by step diagramming illustrations of the questions.

6 0
4 years ago
When using NAND gate instead of NOR gate in SR flip-flop, Q and Q’ both become one when?
Anika [276]

Answer:

  S and R both are 0

Explanation:

A <em>0</em> at the input of a NAND gate causes its output to be <em>1</em>. There is no other logic between the output NAND gate and the S or R inputs, so both inputs 0 will make both outputs 1.

4 0
4 years ago
Other questions:
  • 8. Which of the following must a designer be aware of when planning the design of a document?
    10·1 answer
  • 50 POINTS &amp; A FOLLOW!
    11·2 answers
  • Dawn needs to insert a macro into a Word document. Where can she find the Insert Macro dialog box?
    11·1 answer
  • Which of the following actions has no impact on your credit score
    9·1 answer
  • Write a program using integers userNum and x as input, and output userNum divided by x three times.
    11·1 answer
  • Create an algorithm that will convert dog years to human years using the assumption that 1 dog year = 7 human years. Prompt the
    8·1 answer
  • The compiler determines the parameterized type in a function template ___________.
    13·1 answer
  • Write a function named dice_eval that accepts two parameters representing numeric dice values and returns a string describing th
    14·1 answer
  • Tristan just downloaded a new game he wants to play on his computer. What kind of file should he open in order to install and ru
    5·1 answer
  • What is<br> a an<br> output device
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!