Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A 3 - character string, inString, is read from input. Check if the first and second characters in inString are digit characters. Replace the digit

A 3-character string, inString, is read from input. Check if the first and second characters in inString are digit characters. Replace the digit characters (if any) with '%'. If neither character is a digit, inString is not changed.
Ex: If the input is 475, then the output is:
%%5
Ex: If the input is 5hf, then the output is:
%hf #include
#include
#include
using namespace std;
int main(){
string inString;
getline(cin, inString);
/* Your code goes here */
cout << inString << endl;
return 0;
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Define marketing.

Answered: 1 week ago

Question

What are the traditional marketing concepts? Explain.

Answered: 1 week ago

Question

Define Conventional Marketing.

Answered: 1 week ago

Question

Define Synchro Marketing.

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago