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
AveGali [126]
3 years ago
6

write a recursive bool valued function containsvowel that accepts a string and returns true if the string contains a vowel

Computers and Technology
1 answer:
zhannawk [14.2K]3 years ago
7 0

Answer:

Write a recursive, bool-valued function, containsVowel, that accepts a string and returns true if the string contains a vowel. A string contains a vowel if: The first character of the string is a v…

Explanation:

A:

bool containsVowel (string s) { bool hasVowel=false; if (s.length()==0) return false; else if (s[0]=='a'|| s[0]=='e'|| s[0]=='u'|| s[0]=='o'|| s[0]=='i'|| s[0]=='A'|| s[0]=='E'|| s[0]=='U'|| s[0]=='O'|| s[0]=='

You might be interested in
Write a program thattakes a number x and its exponent y from the user and thencalculate the result
miv72 [106K]

Answer:

#include<iostream>

using namespace std;

//main function program start from here

int main(){

   //initialize the variables

  int num, exponent;

   int result=1;

   //print the message on the screen

  cout<<"Please enter the number: ";

  cin>>num;  //store the user enter value

  cout<<"Please enter the exponent: "; //print the message on the screen

  cin>>exponent;//store the user enter value

   //take a while loop for calculating th power.

  while(exponent != 0){

   result = result*num;

  exponent--;

  }

  cout<<"Result is: "<<result<<endl;

}

Explanation:

Create the main function and declare the variable.

Then, display the message on the screen for the user and store the value enter by the user in the variables by using the instruction cin.

Take a while loop and it run until the value of exponent not equal to zero.

and then repeated multiply the number with the previous value which stores in the result.

for example;

the number is 2 and the exponent is 3. Initially, the result store is 1.

then, result = 1 * 2=2

exponent--, then exponent update the value 2.

again loop executes,

result = 2* 2=4

exponent--, then exponent update the value 1.

again loop executes,

result = 4* 2=8

exponent--, then exponent update the value 0.

The same process happens in our code and it run until the exponent not equal to zero. when it reaches zero, the loop will be terminated.

and finally, print the output.

4 0
4 years ago
Which of the following guidelines about forwarding e-mail messages is most appropriate?
valentina_108 [34]
The last option: 

Avoid forwarding e-mail messages unless you have permission to do so.
5 0
3 years ago
Read 2 more answers
A Homecoming Crossword Puzzle
nasty-shy [4]

Answer:

Umm do you need ideas for that? Like words for it?

Explanation:

6 0
3 years ago
Write c++ code that prints: usernum ... 2 1 blastoff! your code should contain a for loop. print a newline after each number and
nata0808 [166]
#include <iostream>
int main() { int usernum = 3;
for(int i = usernum; i >= 1; i--) { std::cout << i << "\n"; } std::cout << "blastoff!\n";
return 0;}
Works fine my dude:
./randombrainly 321blastoff!
3 0
4 years ago
You are out on the water. you do not understand what another boater intends to do. what sound signal should you make?
olchik [2.2K]
When you do not understand what another boater intends to do, you are required to communicate this to the boater by sounding five or more short and rapid blasts. A short blast means a blast that takes about one second. The two vessel must stop or slow down until they clearly understand each other intent.
7 0
3 years ago
Other questions:
  • Powerpoint s _____ feature allows you to set the timing for a video clip
    12·1 answer
  • For most applications, saving sound files at the _____ bit resolution provides a good balance of sound quality and file size.
    15·2 answers
  • _____ are independent and not associated with the marketing efforts of any particular company or brand.​
    9·1 answer
  • Write a C++ program that stores the integers 50 and 100 in variables and stores the sum of these two in a variable named total.
    11·1 answer
  • What is bigger 4 liters or one gallon
    13·1 answer
  • Guys for those who are familiar to bubble gum sim...THERE IS A HUGE EVENT AND I DONT WANT TO FAIL AN EVENT...(again) is anyone w
    9·1 answer
  • Is the Internet dangerous?
    10·2 answers
  • Hello im looking for someone to answer my question. Its about a coding project called "Quiz Master". Im having trouble with the
    7·1 answer
  • Declare and implement a function called gameOver.gameOver receives a single 3x3 char[] [] array as a parameter, representing a t
    13·1 answer
  • How to hack a I'd Indian brainly bot​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!