Course Solutions Uncategorized (Solved) : Need Update Code Include Include Include Using Namespace Std Int Main String S Cout Enter Q34901056 . . . .

(Solved) : Need Update Code Include Include Include Using Namespace Std Int Main String S Cout Enter Q34901056 . . . .

 

I need to update this code:

#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main()
{
string s;
cout<< “Enter a string” <<endl;
getline (cin,s);
cout<< s <<endl;
int vowels=0,consonants=0,digits=0,specialChar=0;

for (int i=0; i<s.length(); i++) {
char ch=s[i];
if (isalpha(s[i])!= 0){
s[i]= toupper(s[i]);   
if (ch == ‘a’|| ch == ‘e’|| ch == ‘i’|| ch == ‘o’ || ch ==’u’)
vowels++;
else
consonants++;
}
else if (isdigit(s[i])!= 0)
digits++;
else
specialChar++;

}
cout<<“Vowels=”<<vowels<<endl;
cout<<“Consonants=”<<consonants<<endl;
cout<<“Digits=”<<digits<<endl;
cout<<“SpecialCharacters=”<<specialChar<<endl;
return 0;
}

so that it accomplishes everything below:

Read your string from an input file instead of from the user
Need it to refernce a a file named “words.txt”
Remove the call to getUserInput. You can also remove its definitionand prototype if you like.

Then have it process all of the words in the file, not just

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Lab Junit 3 Using Junit Http Wwwvogellacom Articles Junit Article Html 31 Preparation Crea Q34297298 . . . .(Solved) : Lab Junit 3 Using Junit Http Wwwvogellacom Articles Junit Article Html 31 Preparation Crea Q34297298 . . . .

<br/><img src="https://media.cheggcdn.com/media%2F7aa%2F7aa2e659-fc9a-4565-869b-677074d87e85%2Fimage.png" alt="Lab jUnit 3. Using jUnit from http://www.vogella.com/articles/JUnit/article. html 3.1. Preparation Create a new project LabJUnit. We want to create the unit tests in a separate folder. The creation