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
Wrire a code that display elements at indices 1 and 4 in the follwoing array.
Sveta_85 [38]

Answer:

Console.log(userArray[1]);

Console.log(userArray[4]);

Explanation:

The programming language was not stated; however, the variable declaration implies JavaScript.

JavaScript prints using the following syntax:

Console.log(print-name);

Since, the code is to print some elements of array userArray.

First, we need to determine the index of the elements.

The indices are given as 1 and 4.

So, the code to print these elements is as follows:

Console.log(userArray[1]);

Console.log(userArray[4]);

8 0
3 years ago
What type of ransomware was developed to block the user from accessing the computer and encrypts all the files on the user's dev
Mamont248 [21]

Answer: A. CRYPTO-MALWARE

Explanation: Crypto-malware is a type of ransomware that blocks the uses from accessing the computer system,it also encripts all the files.

This type of ransomware is mainly used to demand for ransom.

This type of ransomware which makes use of sophisticated and advanced ransomware technology to ensure that encripting must be with a unique Key or password,the hijacked system is used for crypto mining without the owns consent.

7 0
3 years ago
Read 2 more answers
1)A popular and useful tool for strategic planning is SWOT analysis. SWOT stands for
Blizzard [7]

1. strengths, weakness, opportunities, threats

2. protecting the privacy of others

3. this behavior can create divisions on the team.

4. creating a schedule for workflow

7 0
3 years ago
Which image file format is the most widely used?
Ostrovityanka [42]

Answer: jpeg because its a lot of people use it for quaity

7 0
2 years ago
The format for the UPDATE command is the word UPDATE, followed by the name of the table to be updated. The next portion of the c
fenix001 [56]

The format for the UPDATE command is the word UPDATE, followed by the name of the table to be updated. The next portion of the command consists of the word <u>SET</u>, followed by the name of the column to be updated, an equals sign, and the new value.​

Explanation:

  • An Update Query is an action query (SQL statement) that changes a set of records according to criteria you specify.
  • The SQL UPDATE Query is used to modify the existing records in a table. You can use the WHERE clause with the UPDATE query to update the selected rows, otherwise all the rows would be affected.
  • Update Queries let you modify the values of a field or fields in a table.

<u>UPDATE Syntax </u>

  • UPDATE table_name
  • SET column1 = value1, column2 = value2, ...
  • WHERE condition;

UPDATE table_name SET column1 = value1, column2 = value2, etc WHERE condition;  

  1. table_name: name of the table
  2. column1: name of first , second, third column....
  3. value1: new value for first, second, third column....
  4. condition: condition to select the rows for which the  
  5. values of columns needs to be updated.

8 0
4 years ago
Other questions:
  • Gary lives in an area that receives high rainfall throughout the year. Which device would be useful to him to maintain his compu
    10·2 answers
  • Charges of the opposite tend to repel each other.
    9·2 answers
  • The different types of DDR modules are easily identifiable because of what factor?
    8·2 answers
  • What systemctl command configures a unit to start the next time the computer boots?
    10·1 answer
  • "The study of how changes in the input parameters of a linear programming problem affect the optimal solution is known as
    8·1 answer
  • Imagine you are building an ATM system; list at least 6 application domains for the system. That is, in which context is the sys
    13·1 answer
  • Heeeeeeeeeeeeeeeeeeelp plz
    11·1 answer
  • Why is it important to perform routine computer maintenance? It can make more room for junk files and downloadable programs. It
    13·2 answers
  • Draw a flowchart diagram for a program that displays numbers 1 to 20
    12·1 answer
  • Explain the role that the number of data exchanges plays in the analysis of selection sort and bubble sort. What role, if any, d
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!