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
Bess [88]
3 years ago
13

Write a function that counts and returns the number of vowels in the input, up to the next newline or until the input is done, w

hichever comes first. Your function should have the following prototype:
int count_vowels();
Computers and Technology
1 answer:
Valentin [98]3 years ago
3 0

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// function that return the number of vowels in the input string

int count_vowels()

{

// variable

   string str;

   int v_count=0;

   cout<<"enter the string:";

   // read the string

   cin>>str;

   // fuind the length

   int len=str.length();

   // check for vowel

   for(int x=0;x<len;x++)

   {

       char ch=str[x];

       if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'||ch=='A'||ch=='E'||ch=='I'||ch=='O'|ch=='U')

       {

           v_count++;

       }

   }

   // return the count

   return v_count;

}

// driver function

int main() {

// call the function and print the result

cout<<"number of vowels in string is : "<< count_vowels()<<endl;

return 0;

}

Explanation:

In the function count_vowels(), read a sting and then find its length.Then check each character of the string is vowel or not.If it is vowel then Increment the v_count. After the loop return the count to main function and print it.

Output:

enter the string: welcometoprogramming

number of vowels in string is : 7

You might be interested in
I need someone whos really good with computers to help me with some things
posledela

Okay what do you need to know

4 0
3 years ago
What Linux services can pose a problem when attempting to reach remote host on a network?
nekit [7.7K]

Answer:

NFS configuration

Explanation:

The Linux server runs the Linus open source operating system that provides a stable, secure and more flexible environment to carry out more challenging jobs like network and system administration, database management and web hosting.

The NFS or Network file system configured on the Linux server only supports Linux servers communication. It mounts the storage of the server on the network for central access.

4 0
3 years ago
Read 2 more answers
he timing device in an automobile’s intermittent wiper system is based on an RC time constant and utilizes a 0.500-μF capacitor
Tatiana [17]

Answer:

4000k-ohm to 10,000k-ohm

Explanation:

As we know that time constant for an RC circuit is t=RC

Putting the values of t we can get the range of varaiable resistor as;

t=RC

Putting t=2 we get the first value of the range for the variable resistor

2=R*0.500*10^-6

R=2/(0.500*10^-6)

R=4*10^6

R=4000k-ohm

Now putting t=5 we get the final value for the range of variable resistor

t=RC

5=R*0.500*10^-6

R=5/(0.500*10^-6)

R=10*10^6

R=10,000k-ohm

So variable resistance must be made to vary in the range from 4000k-ohm to 10,000k-ohm

5 0
3 years ago
You need to design a backup strategy. You need to ensure that all servers are backed up every Friday night and a complete copy o
cestrela7 [59]

Answer: (A) full backup

Explanation: A backup strategy is a term used to describe the various effective approach engaged in creating a backup for data or information.

A FULL BACK UP IS THE VARIOUS APPROACH AND SYSTEMS PUT IN PLACE BY A COMPUTER USER OR AN INFORMATION TECHNOLOGY EXPERT IN ORDER TO CREATE AN ADDITIONAL SAMPLE OR COPY OF AN INFORMATION OR A DATA IN S SINGLE BACKUP.

8 0
3 years ago
Which part of the ethernet address is assigned to vendors to identify the equipment?
Nitella [24]

First three bytes of the ethernet address exists assigned to vendors to identify the equipment.

<h3>What is Ethernet address?</h3>

A media access control address stands for a unique identifier allocated to a network interface controller for usage as a network address in communications within a network segment. This use exists as standard in most IEEE 802 networking technologies, including Ethernet, Wi-Fi, and Bluetooth.

This address exists as the identifying mark that allows a networked computer to communicate with the Internet. The ethernet address exists how we can associate an “IP address” to an individual computer — without this– number, there's no form to access any servers, websites, email, etc.

The first three bytes (pairs of hexadecimal characters) of any unicast address include that vendor address component of the MAC address. The staying three bytes carry the serial number of that vendor's interface card. Dell, Inc. Apple, Inc.

Hence, first three bytes of the ethernet address exists assigned to vendors to identify the equipment.

To learn more about Ethernet address refer to:

brainly.com/question/7284219

#SPJ4

4 0
1 year ago
Other questions:
  • What do you call the number that is used as an index to pinpoint a specific element within an array?
    14·1 answer
  • Frank has created a résumé and separated the sections using headings. How can he set the headings apart from normal text?
    13·1 answer
  • Examples of algorithm
    5·1 answer
  • 5255555555555+55555555555555/1111*99442
    14·2 answers
  • Heres the last questions
    5·1 answer
  • Why are the READ and DATA statements used<br>together?​
    10·1 answer
  • A basic program to find the area of a square​
    6·1 answer
  • Finish the program by choosing the correct terms.
    7·2 answers
  • Which of the following statements is/are correct? a. At the network layer, entitlement can map identity and/or attributes to fun
    8·1 answer
  • Write code that declares a variable named minutes, which holds minutes worked on a job,
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!