How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask LogicPro Your Own Question

LogicPro
LogicPro, Engineer
Category: Homework
Satisfied Customers: 12501
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
29751445
Type Your Homework Question Here...
LogicPro is online now
A new question is answered every 9 seconds

Http://wikisend.com/download/338450/Desktop.rar

Customer Question

http://wikisend.com/download/338450/Desktop.rar
Submitted: 1 year ago.
Category: Homework
Expert:  LogicPro replied 1 year ago.

Hi,

Expert:  LogicPro replied 1 year ago.

Please wait for 1 hour for #1 and #2

Customer: replied 1 year ago.
make sure that question number 4 and 5 ONLY from the lab i ned it within one hour please
Expert:  LogicPro replied 1 year ago.

ok

Expert:  LogicPro replied 1 year ago.

Here is the answer #4: http://www.wikisend.com/download/375214/

Please wait for #5

Expert:  LogicPro replied 1 year ago.
Expert:  LogicPro replied 1 year ago.

You can mention the amount you want to pay. After you rate, I will send the request to refund excess amount. There is no issue in this.

Customer: replied 1 year ago.
Ok i will have a look of it once i got a free pc, but wanna ask u what about the assignment are you working on it?
Expert:  LogicPro replied 1 year ago.

No. You asked to provide this one only in 1 hour. I did it for you with in time. You can rate and mention the price you want to pay as you showed concern about price on last thread. I will request mods to refund access amount. Next time you can select the price you want to pay

Customer: replied 1 year ago.
Is it mean that u wont solve the rest untill i pay u again!!
I meant jusi focus on those two question in the first hour and the rest u have till the night to do it
Expert:  LogicPro replied 1 year ago.

Not like that but it is time taking. That one has three questions. It takes hours to write the code. You can rate and mention the price you want to pay for this one and open an new question for #3 for the price you want.

Customer: replied 1 year ago.
What if i paid 60 for both?
Customer: replied 1 year ago.
Its all in one why should i open new question
Customer: replied 1 year ago.
One of the questions have 3 parts right but exactly the same menu that u did last time for me just change the cout and bodies of each functions long but doesnt mean its difficult i know its a peice of cake for me how about for an expert like u
Expert:  LogicPro replied 1 year ago.

How much time do you have for #3?

Customer: replied 1 year ago.
6 or 7 hours
Customer: replied 1 year ago.
question 5 is not available
Expert:  LogicPro replied 1 year ago.

Here it is Q5 again

http://pastebin.com/raw.php?i=0F5qav6v

check back in few hours for #3

Customer: replied 1 year ago.
i want to say one thing u may didnt pay attention to it in the lab it says in the first line:
In this lab you’re only allowed to use the built-in (predefined) functions that works on any string variable. Any other way of solving the following exercises will not be accepted.
that made the solution wrong and there is no time to make any changes :)
Expert:  LogicPro replied 1 year ago.

but I have used built in functions

Customer: replied 1 year ago.
Write a function that accepts a string as its parameter. The function should count
the number of vowels appearing in the string and return that number.
Write another function that accepts a string as its parameter. This function should count
the number of consonants appearing in the string and return that number.
Demonstrate the two functions in a program that performs the following steps:
1- The user is asked to enter a string.
2- The program displays the following menu:
A) Count the number of vowels in the string
B) Count the number of consonants in the string
C) Count both the vowels and consonants in the string
D) Enter another string
E) Exit the program
3- The program performs the operation selected by the user and repeats until the user selects E, to exit the program.
*/
#include
#include
using namespace std;int CountVowels(string s);
int CountConsonants(string str);int main()
{
char option='a';
int count;
//Ask the user to enter a string
string s;
cout << "Enter a string: ";
cin >> s;//The program displays the following menu
while (option!='E')
{
cout << "Menu: " << endl;
cout << "A. Count the number of vowels in the string " << endl;
cout << "B. Count the number of consonants in the string" << endl;
cout << "C. Count both the vowels and consonants in the string" << endl;
cout << "D. Enter another string " << endl;
cout << "E. Exit the program" << endl;
cin >> option;
option = toupper(option);
switch (option)
{
case 'A':
count = CountVowels(s);
cout << "Vowels = " << count << endl << endl;
break;
case 'B':
count = CountConsonants(s);
cout << "Consonants = " << count << endl << endl;
break;
case 'C':
count = CountVowels(s) + CountConsonants(s);
cout << "Both = " << count << endl << endl;
break;
case 'D':
cout << "Enter string: ";
cin >> s;
break;
case 'E':
cout << "Thank you for using the program" << endl;
break;
}
}return 0;
}int CountVowels(string s)
{
int count = 0;
long long k;
int array[]={'a','i','o','u','e'};
for (int i=0;i<5;i++){
while(k<string::npos){
count++;
k=s.find(array[i],k+1);
}
return count;
}int CountConsonants(string s){
int count=0;
long long index;
int array[]={'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'};
for (int i=0;i<21;i++){
index=s.find(arr[i],index)
while(index>string::npos){
count++;
index=s.find(arr[i],index+1);
}
return count;
}
}this is will be the correct one
Expert:  LogicPro replied 1 year ago.

ok

Customer: replied 1 year ago.
are you available to solve the assignment? because even question 5 is not correct we have to use find and insert and replace
Customer: replied 1 year ago.
sorry question 4 this is the correct answer:
/*Write a function that accepts a string as its parameter. The function should count
the number of vowels appearing in the string and return that number.
Write another function that accepts a string as its parameter. This function should count
the number of consonants appearing in the string and return that number.
Demonstrate the two functions in a program that performs the following steps:
1- The user is asked to enter a string.
2- The program displays the following menu:
A) Count the number of vowels in the string
B) Count the number of consonants in the string
C) Count both the vowels and consonants in the string
D) Enter another string
E) Exit the program
3- The program performs the operation selected by the user and repeats until the user selects E, to exit the program.
*/
#include
#include
using namespace std;int CountVowels(string s);
int CountConsonants(string s);int main()
{
char option='a';
int count;
//Ask the user to enter a string
string s;
cout << "Enter a string: ";
getline(cin,s);//The program displays the following menu
while (option!='E')
{
cout << "Menu: " << endl;
cout << "A. Count the number of vowels in the string " << endl;
cout << "B. Count the number of consonants in the string" << endl;
cout << "C. Count both the vowels and consonants in the string" << endl;
cout << "D. Enter another string " << endl;
cout << "E. Exit the program" << endl;
cin >> option;
option = toupper(option);
switch (option)
{
case 'A':
count = CountVowels(s);
cout << "Vowels = " << count << endl << endl;
break;
case 'B':
count = CountConsonants(s);
cout << "Consonants = " << count << endl << endl;
break;
case 'C':
count = CountVowels(s) + CountConsonants(s);
cout << "Both = " << count << endl << endl;
break;
case 'D':
cout << "Enter string: ";
cin >> s;
break;
case 'E':
cout << "Thank you for using the program" << endl;
break;
}
}return 0;
}int CountVowels(string s)
{
int count = 0;
long long k;
int array[]={'a','i','o','u','e'};
for (int i=0;i<5;i++){
k=s.find(array[i]);
while(k<string::npos){
count++;
k=s.find(array[i],k+1);
}}
return count;
}
int CountConsonants(string s){
int count=0;
long long index;
int array[]={'b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z'};
for (int i=0;i<21;i++){
index=s.find(array[i],index);
index=s.find(array[i]);
while(index<string::npos){
count++;
index=s.find(array[i],index+1);
}}
return count;
}
Expert:  LogicPro replied 1 year ago.
THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
Customer: replied 1 year ago.
hi are you here?
i have two questions but idk if u are able to solve it or not i want to get full mark or between 90 to 100
because last assignment i got zero and the one before it i got 70 the one u solve it so could u please have a look and tell
me if u can solve it or not?
Customer: replied 12 months ago.
hi i have assignment are you able to do it for me?