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
Alenkasestr [34]
3 years ago
8

Count input length without spaces, periods, or commas Given a line of text as input, output the number of characters excluding s

paces, periods, or commas. You may assume that the input string will not exceed 50 characters.
Ex: If the input is:
Listen, Mr. Jones, calm down.
the output is:
21
Note: Account for all characters that aren't spaces, periods, or commas (Ex: "r", "2", "!").
Can I get this in C programming please?
Computers and Technology
2 answers:
MrRa [10]3 years ago
6 0

Answer:

This program is implemented in C++ using dev C++.  The solution of this answer along with running code is given below in explanation section.

Explanation:

#include <iostream>

#include<string>

using namespace std;

int main()

{

   string str;

   

cout<<"Enter String \n";

 

getline(cin,str);/* getLine() function get the complete lines, however, if you are getting string without this function, you may lose date after space*/

 

   //cin>>str;

 

   int count = 0;// count the number of characeter

   for (int i = 1; i <= str.size(); i++)//go through one by one character

   {

     

   

    if ((str[i]!=32)&&(str[i]!=44)&&(str[i]!=46))//do not count  period, comma or space

 {

           ++ count;//count the number of character

       }

   }

   cout << "Number of characters are  = "; //display

cout << count;// total number of character in string.

   return 0;

}

}

Ivanshal [37]3 years ago
5 0

Answer:

user_text = input()

import re

string = ( "listen, Mr. Jones, calm down.")

print(len(re.sub(r'[,.\s]+', '', string)))

Explanation:

You might be interested in
Any movie/show suggestions??
trasher [3.6K]
The office is a good one. If you haven’t ever watched it
6 0
3 years ago
Read 2 more answers
Ano ang word processor at electronic spreadsheet​
AveGali [126]

Answer:

excel

Explanation:

3 0
2 years ago
Read 2 more answers
Solve for x<br><br>4d+3/8=-2​
Alexxx [7]

Answer:

-19/32

Explanation:

(If I assume d to be x)

4x+3/8=-2

or,4x=-2-3/8=-19/8

or,x=(-19/8)*(1/4)=-19/32

5 0
3 years ago
Teaching Siri or the Google Assistant how to recognize your voice by reading to it is an example of ________.
nata0808 [166]

Answer:

4. Supervised learning.

Explanation:

Supervised and Unsupervised learning are both learning approaches in machine learning. In other words, they are sub-branches in machine learning.

In supervised learning, an algorithm(a function) is used to map input(s) to output(s). The aim of supervised learning is to predict output variables for given input data using a mapping function. When an input is given, predictions can be made to get the output.

Unsupervised learning on the other hand is suitable when no output variables are needed. The only data needed are the inputs. In this type of learning, the system just keeps learning more about the inputs.

Special applications of supervised learning are in image recognition, speech recognition, financial analysis, neural networking, forecasting and a whole lot more.

Application of unsupervised learning is in pre-processing of data during exploratory analysis.

<em>Hope this helps!</em>

8 0
3 years ago
अस्स्मन्चचरे ------------------- दृश्यते |
Semmy [17]

Answer:

5?

Explanation:

4 0
3 years ago
Other questions:
  • While trying to solve a network issue, a technician made multiple changes to the current router configuration file. The changes
    7·1 answer
  • Array A is not a heap. Clearly explain why does above tree not a heap? b) Using build heap procedure discussed in the class, con
    15·1 answer
  • The adjustable contact of a potentiometer is placed at the center of its adjustment. If the total resistance is 5 kOhms, what is
    9·1 answer
  • What is the main storage device where the computer stores data?
    15·1 answer
  • Someone who is young, lacks funds, and really wants to gain technical skills while serving his or her nation should consider
    8·1 answer
  • I'm using assembly language. This is my assignment. I kinda confused about how to write code for this assignment. Can anyone exp
    11·1 answer
  • A user calls your help desk to report that the files on her USB stick do not have any permissions associated with them and there
    15·2 answers
  • What is the first thing you should do to find a mean and range of data?
    14·1 answer
  • Plzz help.... <br><br>i will mark u as brainliest if u answer correct
    10·1 answer
  • What is cloud computing?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!