Question
#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #define MAX_STRING_LENGTH 80 using namespace std; int main() { string userInput; cout < >userInput; for (int i = 0;
#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #define MAX_STRING_LENGTH 80 using namespace std; int main() { string userInput; cout<<"Please enter a sentence "; cin>>userInput; for (int i = 0; i < userInput.length(); i++) { if (isdigit(userInput[i])) { cout< #include #include #include #define MAX_STRING_LENGTH 80 void main(void) { char userInput[MAX_STRING_LENGTH]; printf("Please enter a sentence "); scanf("%[^ ]", userInput); for (int i = 0; i < strlen(userInput); i++) { if (isdigit(userInput[i])) { printf("%c", userInput[i]); } } printf(" "); system("pause");//from stdlib } I have errors for c ++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started