Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in the string in c++

Answers

Answer 1
#include
#include

using namespace std;

int CountCharacters(char userChar, string userString){
int result = 0;
for(int i = 0;i if(userString[i] == userChar){
result++;
}
}
return result;
}

int main(){
string userString;
char userChar;
cin>>userChar>>userString;
cout< return 0;
}

Related Questions

types of digital divide ​

Answers

Explanation:

introduction. desktop computer,tablet computer,storage devices such as flash drivers, mobile phone...

How many types of windows does Python use?



a.
four


b.
five


c.
one


d.
two

Answers

Question;

How many types of windows does python use?

Answer;

A.Four

Window does python use is Four

what identifies a cell or a range of cells on a worksheet, and tells excel where to look for values or data you to use in a formula

Answers

I believe it is a cell Reference

what is the keyboard shortcut to display formulas on the worksheet : a. CTRL+ B. CTRL+: C. CTRL+; D. ALL THE ABOVE

Answers

girl i dont know figure it out pookie

How often do you trade cowoncy? If so, for what and how much?​

Answers

There are different ways to trade cowoncy. There are some legitimate site to buy and sell it. In trade cowoncy, about 100000 Cowoncy is bought for $17.89USD.

Cowoncy is commonly described as the OwO bot's form of currency. It is known as a currency used worldwide in hunting.

Its role is mainly for for hunting and in the activation of one's huntbot and it is often used in other form of purchases such as cosmetics, etc.

Learn more about trade from

https://brainly.com/question/17727564

Dean Smith is dissatisfied with the time it takes to get a new faculty ID made and believes more servers will speed up service and reduce costs thanks to shorter lines. Prof. Karen is tasked to study the situation. Prof. Karen observes an average of 20 customers/hr arriving and each technician (service window) serves 5 customer/hr, on average. Assume an M/M/s queue system. Prof. Karen calculates the operational cost of each server as $20/hr, and assumes a cost of waiting in the SYSTEM as $25/hr per customer. What is the optimal number of service windows to minimize total cost

Answers

The answer is :

X = 4

Explanation:

The optimal number of service windows to minimize total cost will be 5 service windows.

How to calculate the optimal value?

The optimal number of service windows to minimize total cost will be calculated thus:

Cost = 20x + 25(20 - 5x)

Cost = 20x + 500 - 125x

Cost = 500 - 105x

For the minimum cost,

500 - 105x = 0

105x = 500

x = 500/105

x = 4.76 = 5

Therefore, the optimal number of service windows to minimize total cost will be 5 service windows.

Learn more about cost on:

https://brainly.com/question/25109150

#SPJ2

Explain why you do not need expensive equipment to take pictures or record video?

Answers

Explanation:

Expensive equipment is not necessary because from a technical perspective as long as the device has a lens and a mic it should be able to take photos and videos.

Answer: No, you don't not need an expensive camera . It may have better quality or worst quality . A phone car record and take pictures. Using a Light Stand Can give you a better lighting and better angle so you don't have to hold it or put it on your table, lap, or desk.

Explanation: A lot of people think you need to own a good camera to take a good photograph. A more expensive camera can help, but certainly is not essential. To answer the question though, it is 'no' – the equipment really doesn't make any difference to the end result, but does affect the process of getting there.

Byeeeeeee Remember to stan BTS , Wear Your Mask, And Drink Water

The term for an operator that may not evaluate one of its subexpressions is

Answers

Answer:

short-circuit

Explanation:

You can enter common data in multiple worksheets by __________.
a) Grouping Worksheets
b) Data Validation
c) PivotTable
d) Consolidating Data​

Answers

Answer:

A.) Grouping Worksheet.

Explanation:

Hope this helps!

Zach has invented a device, which when plugged to household appliances, such as televisions, vacuum cleaners

Answers

Zach's decision is supported by the argument that less mature enabling technologies may be conducive to waiting for enabling technologies to develop further.

Enabling technologies are a set of technological tools that allow companies to start and develop the digital transformation process, to adapt to new technological and digital trends such as:

1- Industry 4.0
2- The smart factory model

According to the above, appliance companies must adapt to new trends in technological design thought about the environment based on renewable energies (such as solar energy) and adapt their products to it.


According to the above, the correct answer is “Less mature enabling technologies may favor waiting for enabling technologies to be further developed”.

because it mentions the best alternative for Zach

The NYC_Bicycle_Counts_2016_Corrected.csv gives information on bike traffic across a number of bridges in New York City. In this path, the analysis questions we would like you to answer are as follows: 1. You want to install sensors on the bridges to estimate overall traffic across all the bridges. But you only have enough budget to install sensors on three of the four bridges. Which bridges should you install the sensors on to get the best prediction of overall traffic

Answers

The ideal would be to install sensors on bridges at the main points of the city, to get a general idea about the traffic in the city.

We can arrive at this answer because:

The bridges that lead to the main points of the city tend to have more movement of people and vehicles.In this case, we can say that these bridges have more intense and constant traffic, which can promote a generalized view of traffic on other bridges.Therefore, by installing sensors to analyze traffic on these bridges, it would be possible to project the data collected from the sensors on less busy bridges, according to the context in which they apply.

In this case, the bridges that lead to commercial centers, highways, tourist places, and other important points of the city, must receive the censors.

You can find more information about traffic at this link:

https://brainly.com/question/10961490

Which system carries the idea of GPS service further than simply telling you which route to take to arrive at a particular place

Answers

There are different uses of GPS. Apple’s Siri system carries the idea of GPS service further than simply telling you which route to take to arrive at a particular place.

Apple Siri  is a software device that can make calls or send texts for a person when he or she is driving.

It often carries the idea of GPS service further as it does not only give GPS but it can help you to tell you, your messages on your Airpods. It often offers some suggestions on things you want to do will driving.

Learn more about Apple Siri from

https://brainly.com/question/9795929

What is a disadvantage of communicating on social media?

Collaborating with others
Speed
Lack of privacy
Maintaining relationships

Answers

Answer:

Lack of privacy

Explanation:

I need help in php coding

Answers

How can i help you please post your question

Write a program that:
a) Asks the user if they want to multiply two numbers that they entered, if their answer equals yes then multiply the numbers else write a message saying "peace out".

Answers

Answer:

num1 = int(input("Enter number 1: "))

num2 = int(input("Enter number 2: "))

choice = input("Do you want to multiply them?: ")

if choice.capitalize() == "Yes":

   print(num1 * num2)

else:

   print("Peace out.")

Explanation:

Gg ez.

(I wrote the it in python because I don't know what language you want it in. Next time, say what language you want.)

What is a complete group of instructions known as in Scratch?
blueprint
program
sprite
code block

Answers

Answer:

I think it may be blueprint

Answer:

program

Explanation:

Implement a function mystery( ) that takes as input a positive integer n and answers this
question. How many times can n be halved (using integer division) before reaching 1?

Answers

Count= 0
While n > 1
n = n
Count += 1
Return count

The function mystery that takes as input a positive integer n is given below. The number of times that can n be halved (using integer division) before reaching 1 is infinite.

What are function mysteries?

The non-negative integers are used to define the mystery function. The more common name of this method is hidden to avoid tempting you to explore the Web for assistance in completing this task, which would be a very dishonorable thing to do. Assume n has m bits.

Count= 0

While n > 1

n = n

Count += 1

Return count

Once. You now have 1/2. You can split 1/2 in half to make quarters, but that is not dividing one, it is dividing one half. If you mean how long the series of subsequent subdivisions you can make can be, the answer is infinite.

Therefore, the number of times that can n be halved (using integer division) before reaching 1 is infinite.

To learn more about function mysteries, refer to the below link:

https://brainly.com/question/14201335

#SPJ2

what is a computer software

Answers

Software is the digital operations performed by a computer’s hardware.

Answer:

Software is a collection of instructions that tell a computer how to work. This is in contrast to hardware, from which the system is built and actually performs the work.

Explanation:

Please mark as brainliest

P3. Produce a plan to use social media in a business to meet its business requirements.

Answers

The plan to use social media in a business include:

It is important to audit the current social presence.  The company should document who their Ideal customer is. A mission statement should be created. One should identify the key success metrics. An engaging content should be created.  The company should also invest in a social media management tool.

It should be noted that using social media in a business is an effective way to meet its business requirements and achieve organizational goals.

Learn more about social media on:

https://brainly.com/question/1163631

What would graphics be classified as?

Answers

Answer:

raster and vector graphics

raster graphics is the answer

Many subject elements make for simple and streamlined looking images. true or false

Answers

Answer:

Explanation:

false. many elements means a complicated picture, not a simple one.

The statement "Many subject elements make for simple and streamlined-looking images" is absolutely false.

What do you mean by Subject element?

The Subject element may be defined as the elements or components of the subject that are significantly responsible for constructing simple or complicated representations in the form of images.

It is a term or phrase that deals with the representation of fundamental topics on which a particular image relies. It significantly defines all the taxonomic attributes of the streamlined-looking images.

According to the context of this question, many subject elements will definitely lead to complicated and more streamlined images rather than simple ones.

Therefore, the statement "Many subject elements make for simple and streamlined-looking images" is absolutely false.

To learn more about Images elements, refer to the link:

https://brainly.com/question/26307469

#SPJ2

The operation of an enable input on a multiplexer chip is.

Answers

Answer:

is used to activate the chip.

Explanation:

when enable is high the chip works (ACTIVE), when enable is low the chip does not work (MEMORY).

In addition to being fun, another reason that people have been creating games ever since they settled into communities is:
They keep us out of trouble.
They teach us to follow rules.
They teach cooperation.
They teach strategy and critical thinking.

if you want points just keep looking im asking questons liek crazy

Answers

Answer:

I am pretty sure it's D. to teach strategy and critical thinking.

Answer:

They teach strategy and critical thinking

Explanation:

Explain the 3 types of control transfer structures in programming using flowchart symbols

Answers

Answer:

Process Flowchart.

Data Flowchart.

Business Process Modeling Diagram.

What are some settings you can control when formatting columns? Check all that apply.


Answers

Answer:

1,3,4,6,7, hope that helps'

Explanation:

A company purchases a flood insurance policy for its data center. What is its risk

management decision?

1) Mitigation

2) Acceptance

3) Avoidance

4) Transference

Answers

When a company purchases a flood insurance policy for its data center, the risk management decision it took is: 4) Transference.

Risk management can be defined as a process which involves identifying, evaluating, analyzing and controlling potential risks (threats) that are present in a business, which can serve as an obstacle to its capital, revenues and profits.

Basically, risk management decision typically involves prioritizing cause of action or potential threats, so as to avoid, mitigate or transfer the risk that are likely to arise from such business decisions.

The risks or threats that are faced by a business firm can be transferred to a third-party such as an insurance agency, especially to protect its assets and resources in the event of a natural disaster such as flood, fire, earthquake, etc.

In conclusion, transference is a risk management decision that occurs when  a company purchases a flood insurance policy for its data center.

Read more on risk management here: https://brainly.com/question/13760012

Which of the following correctly calculates the
money supply with M2?
A. M2 + M3
B. M2-M1
C. M2 + M1

Answers

Answer:

I think it's C.

Explanation:

I could be wrong, but this is my understanding. M3 equals the sum of all money in the economy. To get M3, you add M2 and M1. So, this would be the correct way to calculate the money supply with M2.

The landing page of a web site has just been edited. Some users are complaining they do not see the updated content being displayed. What could be the possible reason(s)? (Select TWO responses)

Answers

In Software Engineering, when dealing with UI, there are a lot of attribute particular to text view that if not properly formatted may affect the users experience.

Two possible things that comes to my mind as a software developer are

The text colour may have be altered such that it matches that of the background so that it cannot be seen anymoreThe text View visibility may have been set to "INVISIBLE " or "GONE"

A little more checkup and tweaking or a search from online repository can go a long way to help the situation and the right user experience will be delivered.

Learn more about web design here:

https://brainly.com/question/25941596

Write a program that lets the user enter four quarterly sales figures for six divisions of a company. The figures should be stored in a two-dimensional array. Once the figures are entered, the program should display the following data for each quarter: - A list of the sales figures by division - Each division's increase or decrease from the previous quarter (this will not be dis- played for the first quarter) - The total sales for the quarter - The company's increase or decrease from the previous quarter (this will not be dis- played for the first quarter) - The average sales for all divisions that quarter - The division with the highest sales for that quarter Input Validation: Do not accept negative numbers for sales figures.

Answers

Answer: Buisness calendars

Explanation:

when i use python idle to execute a command, i get this message in shell

RESTART: C:/something something

Answers

Answer:

yes it always come whenever u execute a command

It comes with everyone

Other Questions
which early 1900s group is best characterized by this list? overcrowded tenement apartments dangerous working conditions segregated ethnic neighborhoods how does the movement of tectonic plates create new mountains? Please help this is the final. Identify a minimum of two ways companies compete for your money. In a minimum of five sentences each, explain in what way each of those tactics has been proven to be successful. Replace the adjectives in bold with their oppositesplease answer this questions in the photo I need hhelp How were Ray Kroc and Walt Disney similar?A. They both were masterful salesmen.B. They were both born in Southern California.C. They both received advanced degrees.D. They both came from very wealthy families. What does it mean for a bacteria or protist to be photosynthetic?O They are responsible for disease growth.o They are only responsible for the decomposition of compost.They are a primary producer of biomass in the ocean.They are multi-cellular organisms. May I please receive help? Match the Professionalism term with its meaning1.Integrity2.Productivity3.Punctuality4.Initiative5.Accountabilitya.being responsible for your actions and wordsb.doing the right thing, even when no one is watchingc.doing your job as efficiently and effectively as possibled.being on timee.to take charge or do things without being told A scuba diver descends farther down into the ocean from an initial depth of 12.8 feet below sea level. The scuba diver descends at a constant rate for 312 minutes and reaches a depth no more than 49.2 feet below sea level.What is the maximum rate, r, that the scuba diver may descend?r10.4r10.4r13 7/9r13 7/9 Assume that you have already completed a 5-year international assignment working for KPMG as a Tax Consultant in Singapore. By using the relocation transition curve, you need to write an essay to make your own analysis and explain how you adapted to the new living and working environment. PLEASE HELP - I WILL GIVE 30 POINTS AND BRAINLIEST IF YOU GET IT RIGHTQuote Analysis : Theyre all just make - believe, this dream I was having for a long time, and now Im awake again and hes filling the room somehow, even though were outside. page 102 Who are they ? Why are they compared to a dream ?( book : freak the mighty ) does learning a language help you see the world differently Which of the following is an accurate statement about the coastal areas of Mexico? a. The climate is more moderate along the eastern coast than along the western coast. b. The Gulf Coast is an oil-producing region, while the southern Pacific coast benefits from a tropical climate that encourages tourism. c. There are more major cities in the northern Pacific coast region than in the southern Pacific coast region. d. Tourism is more important to the economy of the eastern coastal area than the western coastal area. After mitosis and cytokinesis are complete which of the following are true. The second step to dividing 3 into 1/2 Which sentence from the passage BEST exemplifies how the author of "The Journey to Acceptance" contradicts the author of "Mendels Momentous Work"? A Gregor Mendels work has had a profound impact on modern research in the field of genetic science.B It was not until 1900, over thirty years after his death, that his theories were re-examined and accepted over those of his peers.C During the 1800s, the most accepted theory of inheritance was that traits inherited from parents blend in each generation, known as the blending theory.D Biologists finally accepted the laws of Mendelian inheritance, and a new breed of scientist was born Gabriella and her children went into a restaurant where they sell hotdogs for $4 each and tacos for $2 each. Gabriella has $30 to spend and must buy a minimum of 9 hotdogs and tacos altogether. Also, she must buy no less than 2 hotdogs. If xx represents the number of hotdogs purchased and yy represents the number of tacos purchased, write and solve a system of inequalities graphically and determine one possible solution. The amount of energy involved when an electron is acquired by a neutral gaseous atom is what? what is 7.5% as a fraction EXPLAIN.fykutftufltfdkuuyfukyfktuekdkutdyrjsjrysydyjrsrsusdtysryhstyrdftu