write a c++ program that prints the intial letter of any name​

Answers

Answer 1

Answer:

please mark as brainliest!!

Explanation:

// C++ program to print initials of a name  

#include <bits/stdc++.h>  

using namespace std;  

 

void printInitials(const string& name)  

{  

   if (name.length() == 0)  

       return;  

 

   // Since touuper() returns int, we do typecasting  

   cout << (char)toupper(name[0]);  

 

   // Traverse rest of the string and print the  

   // characters after spaces.  

   for (int i = 1; i < name.length() - 1; i++)  

       if (name[i] == ' ')  

           cout << " " << (char)toupper(name[i + 1]);  

}  

 

// Driver code  

int main()  

{  

   string name = "prabhat kumar singh";  

   printInitials(name);  

   return 0;  

}

Answer 2

Answer:

#include<iostream>

using namespace std;

int main(){

char str[20];

int i=0;

std::cout<<"Enter a name:" ;

cin>>str;

cout<<*str;

while(str[i]!='\0'){

if(str[i]==' '){

i++;

cin>>*(str+i);

}

i++;

}

return 0;

}


Related Questions

A model of the helium atom is shown below. Select all of the neutrons in the picture.

Answers

Given is a helium atom. Inside the nucleus , there are 2 protons denoted by blue colour and the other two are neutrons denoted by green colour

Chemical element helium has the atomic number 2 and the symbol He. It is the first member of the noble gas group in the periodic table and is a colorless, odorless, tasteless, non-toxic, inert, monatomic gas.Neutrons have no charge, protons have a positive charge, and electrons have a negative charge.One proton's positive charge and one electron's negative charge are equal.While electrons have essentially negligible mass, protons and neutrons each have a mass of 1.While electrons quickly revolve around the nucleus in fixed circular orbits, protons and neutrons are present collectively in the nucleus at its center.The nucleus, located in the heart of the atom, is home to protons and neutrons, which are heavier than electrons.

Learn more about helium here:

https://brainly.com/question/26226232

#SPJ10

What molecules tend to have high kinetic energy and low intermolecular forces.

Answers

Answer: Two factors determine whether a substance is a solid, a liquid, or a gas: The kinetic energies of the particles (atoms, molecules, or ions) that make up a substance. Kinetic energy tends to keep the particles moving apart. The attractive intermolecular forces between particles that tend to draw the particles together. As the temperature continues to drop, the matter forms a solid. Due to the solid's low kinetic energy, particles have no "time" to move around, the particles have more "time" to be attracted. Therefore, solids have the strongest intramolecular forces (because they have the strongest attraction). The three states of matter are: Solids: The strong bonds between molecules make solids rigid and very difficult to deform. Liquids: The relatively weak bonds between molecules allow liquids to be deformed without effort.

Hope this helps.......... Stay safe and have a Merry Christmas!!!!!! :D

what is the correct name for the compound MgBr?

Answers

Answer:

Magnesium bromide

Explanation:

its just the answer give brianliest

Based on table N of the reference tables what is the number of hours required for 42k (potassium -42) to undergo three half-life periods

Answers

The number of hours required : 37.2 hours

Further explanation

Given

⁴²K (potassium -42)

Required

The number of hours

Solution

The atomic nucleus can experience decay into 2 particles or more due to the instability of its atomic nucleus.  

Usually, radioactive elements have an unstable atomic nucleus.  

Based on Table N(attached), the half-life for ⁴²K is 12.4 hours, which means half of a sample of ⁴²K will decay in 12.4 hours

For three half-life periods :

[tex]\tt 3\times 12.4=37.2~hours[/tex]

Please help me choose the correct statement

Answers

The ball has more mass because it weights more it may be less dense but more weight is being added to it

What is the name of the warm phase associated with melting ice and higher sea level? PLSSSSSSS ILL GIVE 5 STARS PLSSS JUST PLS HELP ME ITS FOR MY MIDTERM REVIEW ;-; ITS DUE TODAY!!! PLSSS

Answers

Global Warming

Explanation:

The melting of the polar ice caps due to mostly negative human interactions with the environment.

1. Suppose that there were two isotopes of Sodium.
28% of the naturally occurring sodium atoms had a
mass of 22, and 72% atoms had a mass of 23. What
would the average atomic weight of sodium be?

Answers

Answer: C. The university surveys 600 randomly selected students who attend the university. Correct

Explanation:

22.72 is the average atomic weight of sodium.

What are isotopes?

Isotopes are different versions of a specific element.

1st isotopes of 22u = 28%

2nd isotopes of 23u = 72%

The average atomic weight of sodium be=

22 x 28 + 23 x72

=2272/100

=22.72

Hence, 22.72 is the average atomic weight of sodium.

Learn more about isotopes here:

https://brainly.com/question/13662697

#SPJ2

Which is most likely to be damaged by an acid? A. A glass jar B. A plastic bottle C. A gold bracelet D. An aluminum can

Answers

Answer:

aluminum can

Explanation:

source: trust me bro im currently working on acid and bases and acid doesnt eat through gold

The object which is most likely to be damaged by an acid is Choice D: An aluminium can.

When an acid undergoes ionization in an aqueous solution, the positively charged ion released is; Hydroxonium ion, H30+.

In essence, the hydrogen ion of an acid can be displaced by the Aluminium ion in the aluminium can.

This phenomenon is evident in the arrangement of metals in the electrochemical series.

Aluminium is more reactive than the hydrogen ion. As such, an Aluminium can is most likely to be damaged by an acid.

Read more:

https://brainly.com/question/22964871

14. HCOOH is an example of
A. alcohols.
B. aldehydes.
C. carboxylic acids.
D. ethers.
E. ketones.​

Answers

Answer:

carboxylic acid is the answer

Explanation:

Plz mark brainliest

Use the drop-down menus after each statement to identify the dry climate region being described.
v climates feature hot summers and cold winters, dividing the climate into sharply contrasting
seasons.
v climates are characterized by very little rainfall, hot summers, and mild winters.
v climates have annual precipitation between 15 and 25 inches.
Semiarid climate regions have areas of grasslands, called
steppes.

Answers

Answer:

✔ semiarid

✔ desert

✔ semiarid

✔ steppes

.

Explanation:

The deserts and steppes comprise the regions that are characterized by dry climates. The dry climates are characterized by very little rainfall, hot summers, and mild winters. The correct option is B.

What is a dry climate?

The areas which are very dry and where the water escapes and leaves the area drier than other places is known as the dry climate. Most dry climates have summers very hot, winters cool and warm and the air is very dry.

The main characteristic feature of the dry climate is the low and infrequent rainfall. Arid and semi desert areas have only about 35 cm rainfall per year.

Thus the correct option is B.

To know more about dry climate, visit;

https://brainly.com/question/3623676

#SPJ2

When a chemical reaction takes place, the number of atorns of each element in the reactants
nunber of atorms of each element in the products.
will be dferent from
must be equal to

Answers

Answer:

The law of conservation of matter says that matter cannot be created or destroyed. In chemical equations, the number of atoms of each element in the reactants must be the same as the number of atoms of each element in the products

Explanation:

separation methods for coconut oil and water​

Answers

Answer:

[tex]\huge\mathtt{{\colorbox{silver}{ANSWER~~~↴}}}[/tex]

we use a separating funnel to separate oil from water , we are using funnel because both water and oil both are immiscible liquids.

the process of separation of oil from water is called filtration ✔️

no copied answer :)

▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃▃

If you leave your home at noon, and the speed limit is 50 km/h on the highway, what is the approximate time will you get to Atlantic City if Atlantic City is 150 km away? (obeying the speed limit of course)

Answers

Answer:

The time you will get to Atlantic City is 3 pm

Explanation:

Given;

speed limit, v = 50 km/h

distance to be traveled, d = 150km

The time of the motion is given as;

time = distance / speed

t = (150 km) / (50 km/h)

t = 3 hours

Thus, if you leave your home at noon, the time you will get to Atlantic City is given as;

time to get home = 12 pm + 3hours = 3 pm

Therefore, the time you will get to Atlantic City is 3 pm

Draw the Lewis structure for SO2. How
many single bonds, double bonds, triple
bonds, and unshared pairs of electrons are
on the central atom, in that order?
1. 3, 0, 0, 1
2. 2, 1, 0, 0
3. 4, 0, 0, 0
4. 1, 1, 0, 1
5. 0, 0, 1, 1
6. None of these
7. 0, 1, 1, 0
8. 2, 0, 0, 2
9. 0, 2, 0, 0
10. 1, 0, 1, 0

Answers

Answer:

It should be 9

Explanation:

That’s how I remember drawing them I took chemistry last year. Tell me if it’s good.

The nervous system involves actions that control

Answers

Answer:

The peripheral nervous system can be further divided into the autonomic system, which regulates involuntary actions, and the somatic system, which controls voluntary actions.

Explanation:

mark as brainly plz and thanks

Answer: voluntary actions.

Explanation:The peripheral nervous system can be further divided into the autonomic system, which regulates involuntary actions, and the somatic system, which controls voluntary actions.

In this reaction, how does the rate of forward reaction vary with the concentration of the product?

2H2S(g) ⇌ 2H2(g) + S2(g)

It increases with an increase in the concentration of S2(g).
It decreases with a decrease in the concentration of H2(g).
It increases with a decrease in the concentration of H2(g).
It decreases with an increase in the concentration of S2(g).
It decreases with increase in the concentration of H2(g).

Answers

Answer:

c d e

Explanation:

Answer:

C D E

Explanation:

#platogang

Liam observed that the pyrite looks like metal. what property did the student investigate?

Answers

Answer:

The correct answer is - Luster.

Explanation:

Luster is a property that explains how the light is reflected on the surface of a mineral. Luster can be categorized with the help of if an element or mineral is metallic or non-metallic.

Pyrite has a shiny, opaque metallic luster which is similar to other metals. There are different types of luster other than metallic also found like, silky, dusty, pearly, waxy, and a few more.

In a molecule of calcium sulfide, calcium has two valence electron bonds, and a sulfur atom has six valence electrons. How many lone pairs of electrons are present in the Lewis structure of calcium sulfide?
A. one
B. two
C. three
D. four
E. none
Also, state why.

Answers

There are none

Further explanation

Given

a molecule of calcium sulfide

two valence electron of Calcium(Ca)

six valence electrons of Sulfur(S)

Required

number of lone pairs of electrons

Solution

Lewis structure shows the form of bonds that occur in the valence electrons of an element or compound

Valence electrons are electrons used in a chemical bond

To achieve stability, the element S needs 2 more electrons which are obtained from 2 electrons from the Ca element,

A lone pair electron means refers to an unshared pair of electrons(not bonding to the other atoms)

This condition usually occurs in covalent bonds

As we know, the bond between Ca, which is a group 2 (metal) with Sulfur in group 16, is an ionic bond because it occurs between metal and non-metal ions, so there is no sharing of electrons, but there is a release of electrons from Ca ions to S ions to form an octet. , so all the valence electrons in S are paired

Displacement can be added to get the total
a) velocity
b) distance
c) speed
d) acceleration

Answers

im pretty positive it’s velocity i remember learning about this last year in physics sorry i don’t have an explanation but i’m pretty sure it’s velocity

An object is placed at 0 on a number line. It moves 3 units to the right, then 4 units to the left, and then 6 units to
the right. What is the displacement of the object?
1
5
7
13

Answers

your answer is five ;))))

Answer:

the answer will be five

Explanation:

i got this question on a test and i got it right

PLEASE HELP ASAP

Which two reactions are slower than the others?
A. Silver tarnishes in air that contains hydrogen sulfide.
B. Lead nitrate and potassium iodide react to form a yellow
precipitate.
C. Black powder in fireworks burns explosively to produce white
light
D. Iron metal reacts with oxygen in air to form rust.

Answers

Answer:

A and D takes much slower

Explanation:

Here, we want to select, out of the four given reactions, the one that is slower than the other two

The answers in these case are reactions 1 and 4 ( A and D)

The two reactions show what is called rust (as directly seen in reaction 4)

When we speak of rust, we simply mean a reaction that occurs over time

For example, non coated roofings of houses doesn’t get to change color at an instant

The color degradation that occurs is something that takes some time from the initial time they were used to roof the house

Hence, from these analogy, we can see that these reactions need an an external support to thrive or to come into existence

These external supports are natural forces and they contributing efforts occur over time and cannot be seen immediately

These reactions are thus ones that take much slower time than conventional laboratory reactions in the case of the formation of the precipitate or a reaction that requires a low flash point temperature such as that of black powder to produce such explosive effects

So in conclusion, what we are saying is that the two selected reactions are subjected to the availability of some conditions and may take time to manifest and these absolutely differentiates them from reactions that are spontaneous such as the one having an explosive effect or the other one leading to the formation of a precipitate which takes far less times

In diamond, each carbon atom is covalently bonded to four other carbons in a
a. Polyhedron
b. Hexagon
c. Pentagon
d. Tetrahedron

Answers

Answer:

Tetrahedron

Explanation:

Each carbon atom in a diamond is covalently bonded to four other carbons in a tetrahedron. These tetrahedrons together form a three-dimensional network of six-membered carbon rings in the chair conformation, allowing for zero bond-angle strain.

ANSWER ASAP please I need help thank you I’ll give you brainly

What is the standard cell notation of a galvanic cell made with silver (Ag) and
nickel (Ni)?
A. Ni2+(aq) | Ni(s) || Ag(s) | Ag+(aq)
B. Agt(aq) | Ag(s) || Ni(s) | Ni2+(aq)
C. Ag(s) | Ag+(aq) || Ni2+(aq) | Ni(s)
D. Ni(s) | Ni2+(aq) || Ag+(aq) | Ag(s)

Answers

Answer:

See the attached notation!

How many atoms of the element with atomic number 11 are in the reactants of the given formula?

2 NaCl + H2SO4 → 2 HCl + Na2SO4

Answers

The number of Na atoms in the reactants = 2

Further explanation

Every chemical reaction involves compounds that can act as reactants or products

The reactants will react to produce products

The reactants are usually written on the left side of the reaction, while the products on the right side of the reaction

Reaction

2 NaCl + H₂SO₄ → 2 HCl + Na₂SO₄

The element with atomic number 11  = Na(Natrium)

The number of atoms of the element that reacts or is produced can be seen from the reaction coefficient and the number of atoms in the compound

Na in NaCl = 1 atom

From equation, cofficient for NaCl = 2, so number of atoms of Na=2 x 1 = 2

Pan of water sitting outside during a hot sunny day. The temperature of the water goes up. What type of heat transfer causes the temperature to go up?

Answers

Answer: Convection

Explanation:

I hope this helps :D

Answer:

Radiation

Explanation:

It said that was the answer on the test.

 

A pan of water is sitting outside during a hot sunny day. The temperature of the water goes up. What type of heat transfer caused the temperature to go up?

conduction

induction

Incorrect: convection

Correct: radiation

how many bonds can sodium form

Answers

it exists as atom or ion but not as sodium molecule. So there is no any sodium sodium bonding between two sodium atoms. Sodium combines with other element or group to form compounds of sodium like sodium chloride ,sodium carbonate ,sodium sulphate etc. Sodium has symbol Na and its atomic no. is 11 .

Answer:

[tex]\boxed{One\: Ionic\: Bond}[/tex]

Explanation:

For example, sodium, which is a metal, and chloride, a nonmetal, form an ionic bond to make NaCl.

Hope it helps!<3

EXPLAIN What is one way that the thermal energy of a system can be changed?

Answers

Answer:

When the temperature of an object increases, the average kinetic energy of its particles increases. When the average kinetic energy of its particles increases, the object's thermal energy increases. Therefore, the thermal energy of an object increases as its temperature increases.

Explanation:

BTW I GOT THE ANSWER FROM KRISTINA

The thermal energy of a system is the amount of heat energy in it.

One way to change thermal energy is by alter the system by introducing a new object to the system.

The thermal energy of a system is calculated using:

[tex]E = \frac 12 mc\theta[/tex]

Assume the mass of the system remains unchanged.

When an object is introduced to the system, the thermal energy becomes:

[tex]E_2 = \frac 12 mc(\theta + \alpha)[/tex]

Where:

[tex]\alpha \ne 0[/tex] --- the temperature of the object.

Expand:

[tex]E_2 = \frac 12 mc(\theta) + \frac 12 mc (\alpha)[/tex]

Substitute: [tex]E = \frac 12 mc\theta[/tex]

[tex]E_2 = E + \frac 12 mc (\alpha)[/tex]

This means that the thermal energy of the system will change by the thermal energy of the object that is being introduced to the system.

Hence, one way the thermal energy can be changed is to introduce a new object (or matter).

Read more about thermal energy at:

https://brainly.com/question/18989562

If 50. mL of 1.0 M NaOH is diluted with distilled water to a volume of 2.0 L, the concentration of the resulting solution is A0.025 M B 0.050 M C 0.10 M D 0.50 M E 1.0 M M​

Answers

Answer: The concentration of the resulting solution is 0.025 M

Explanation:

According to the dilution law,

[tex]M_1V_1=M_2V_2[/tex]

where,

[tex]M_1[/tex] = molarity of concentrated [tex]NaOH[/tex] solution = 1.0 M

[tex]V_1[/tex] = volume of concentrated [tex]NaOH[/tex] solution = 50 ml

[tex]M_2[/tex] = molarity of diluted [tex]NaOH[/tex] solution = ?

[tex]V_2[/tex] = volume of diluted [tex]NaOH[/tex] solution = 2.0 L = 2000 ml (1L=1000ml)

Putting in the values we get:

[tex]1.0\times 50=M_2\times 2000[/tex]

[tex]M_2=0.025M[/tex]

Therefore, concentration of the resulting solution is 0.025 M

The concentration of the resulting solution if 50. mL of 1.0 M NaOH is diluted with distilled water to a volume of 2.0 L is 0.025M

HOW TO CALCULATE FINAL CONCENTRATION:

The concentration of a solution can be calculated by using the following formula:

C1V1 = C2V2

Where;

C1 = initial concentration (M)C2 = final concentration (M)V1 = initial volume (L)V2 = final volume (L)

According to this question;

C1 = 1.0MV1 = 50mLC2 = ?V2 = 2000mL = 2L

1 × 50 = C2 × 2000

50 = 2000C2

C2 = 50 ÷ 2000

C2 = 0.025M

Therefore, the concentration of the resulting solution if 50. mL of 1.0 M NaOH is diluted with distilled water to a volume of 2.0 L is 0.025M.

Learn more at: https://brainly.com/question/17329736?referrer=searchResults

Which change would best aid a farmer in making the transition from conventional farming techniques to more sustainable farming techniques?
irrigate crops using well water

reduce the ratio of essential elements in the fertilizer

plant only genetically modified crops

rotate the types of crops grown

Answers

Answer:

Rotate the types of drops grown

Explanation:

Please help me!!!!!!!it is about elements on the periodic table. Please help!!!!!

Answers

Answer:

a\c enables the protons so therefore we duplicate the neutrons making for the first one 80 squared then subtracted by 201 and then do that for all

Other Questions
Members of the upper middle class hold white-collar jobs. Please select the best answer from the choices provided T F -2g+1.5=17.3 My math final has this, my answer isnt on my screen. Starting to think i dont know how to do math. Use the diagram below to answer the question. There is a small building that is 24 feet tallThe fire fighter is standing 7 feet away from the building. Walter is planning to invest in a savings account which pays annual interest compounded monthly. His projected account balance aftertyears is given by the expression below.3,570(1 + 0.03/12)^12tWhich of the following statements best describes the expression? a)Multiply:2y x 6y2 x (-4y) Hey! So I'm picking out a name for my little girl and I was wondering if this name sounds cute: Bobbi Lynn. Just remember its for a girl I know Bobbi is a unisex name but i need suggestions to those with experience with motherhood in the story ADHESIVE FROM TREES COULD MAKE TAPE MORE ECO-FRIENDLY what is the central idea of the text (common.lit) Is the equationy=-1/2 linear or nonlinear? Iraqi sunnis are in conflict with what group in Iran ? On Saturdays, Eve earns $14 per hour for yard work and an extra amount for dog walking. Look at the table. Choose the linear function f Eve can use to determine her pay.Hours 1 2 3 4 5Pay 26 40 54 68 82 A. f(x) = x + 14 B. f(x) = 12x + 16 C. f(x) = 12x + 14 D. f(x) = 14x + 12 Aikman, Inc., manufactures and sells two products: Product O6 and Product O7.Data concerning the expected production of each product and the expected total direct labor-hours (DLHs)required to produce that output appear below:The direct labor rate is $17.50 per DLH.The direct materials cost per unit for each product is given below:The company has an activity-based costing system with the following activity cost pools, activity measures, and expected activity:The unit product cost of Product O6 is closest to:A) $637.15 per unitB) $896.71 per unitC) $721.00 per unitD) $661.45 per unit Pls help I need this done soon and I suck at math Read the passage from Sugar Changed the World.But there is another story as well. Information about sugar spread as human knowledge expanded, as great civilizations and cultures exchanged ideas. In fact, while sugar was the direct cause of the expansion of slavery, the global connections that sugar brought about also fostered the most powerful ideas of human freedom.How do the details in this passage support the authors purpose?The details about the expansion of sugar inform readers about how widespread the use of sugar was.The details about human knowledge inform readers about how humans learned about sugar.The details about ideas and global connections persuade readers that sugars story has multiple consequences.The details about the spread of information about sugar entertain readers with stories of travel.PLEASE ANSWER QUICK IS IT A OR C A has a frequency of 300 Hz and a wavelength of 1.10 m. What is the velocity of the wave? Mountain goats have split hooves for better grip on steepy mountains. What kind of adaptation is this?A) StructuralB) PhysiologicalC) BiochemicalD) EcologicalWILL MARK AS BRILLIANT!!! One lasting economic effect of the Crusades was... ?1. Increased trade along the Mediterranean Sea2. Government control of Holy Lands3. Peace between the Muslims and Christians4. Military growth of European Nations HELP PLEASE! FINALSS! D:What does the Jewish mantra "never forget" mean? A. People need to acknowledge the horrors of the Holocaust and remember the people responsible for it. B. Countries need to find, prosecute, and hold responsible those who participated in the Holocaust. C. People need to remember the victims of the Holocaust and ensure that there is never another Holocaust. D. Holocaust survivors should never forget what happened to them and their families by the Nazi regime. Luke was out of cereal for breakfast. He walked to the grocery store to buy his favorite, Honey Nut Cheerios. While looking at the cereal, he noticed all the different box sizes and different prices. A giant "Family Size" box contained 14.7 oz and cost $5.99. A small, individual size contained 1.5 oz and cost $1.89. He wanted to get the most "bang for his buck." Which choice is the better buy? In other words, which choice is cheaper per ounce? Which one should he buy and why? Find the equation to the line , Please help !!!! Why did people begin to demand an end to property requirements for voting 1819?