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

someone help me plz :))) brainliest

Answers

Answer:

Option 2

Explanation:

If you have 6.02x10^23 molecules of trisulfur monoxide, how many grams would it weigh?

Answers

Answer:

112.18 g.

Explanation:

you're using stoichiometry to find the mass of the compound S₃O.

(oh no)
What is the mass of silicon when there are 1.8 x 10^21 atoms of silicon?

Answers

Answer:

Mass = 0.084 g

Explanation:

Given data:

Mass of silicon = ?

Number of atoms of silicon = 1.8 × 10²¹ atom

Solution:

Avogadro number:

The given problem will solve by using Avogadro number.

It is the number of atoms , ions and molecules in one gram atom of element, one gram molecules of compound and one gram ions of a substance.  The number 6.022 × 10²³ is called Avogadro number.

1 mole = 6.022 × 10²³  atoms

1.8 × 10²¹ atom × 1 mole /  6.022 × 10²³  atoms

0.299× 10⁻² mol

0.00299 mol

Mass of silicon:

Mass = number of moles × molar mass

Mass = 0.00299 mol × 28.1 g/mol

Mass = 0.084 g

What is the relationship between Force and Velocity?
Affect/Effect
Cause/Blame
Claim/Reasoning
Cause/Effect

Answers

Answer:

Cause/ effect relationship.

Explanation:

because the force is the cause of energy that is present and velocity is the effect (speed) that is present.

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!

In which material would the particles be closest together?
O Syrup
O Brick
O Air
O Water

Answers

I think air but if wrong sorry

Answer:

Brick

Explanation:

The distance between particles is best determined by density. So, to find which material has the most compacted particles, we need to find which material has the highest density. Solids will always have the highest densities, so Brick would have the particles that are closest together.

What is the mass of hydrogen produced when 8.0 g of sodium
reacts with an excess of water to produce hydrogen and sodium
hydroxide? The equation is given.
2 Na + 2 H2O → 2NaOH + H2

Answers

Answer:

Mass = 0.35 g

Explanation:

Given data:

Mass of sodium = 8.0 g

Mass of hydrogen produced = ?

Solution:

Chemical equation:

2Na + 2H₂O     →    2NaOH + H₂

Number of moles of sodium:

Number of moles = mass/molar mass

Number of moles = 8.0 g/ 23 g/mol

Number of moles = 0.35 mol

now we will compare the moles of sodium and hydrogen

             Na           :           H₂

             2             :            1

           0.35          :      1/2×0.35 = 0.175 mol

Mass of hydrogen:

Mass = number of moles × molar mass

Mass = 0.175 mol × 2 g/mol

Mass = 0.35 g

Which of the following would increase the intensity of the tornado?

a. decrease in wind speed
b. decrease in condensation
c. increased rate of evaporation
d. increase of cold air

Answers

I think the answer would be C. Not totally sure, but hope this helps.

what's the molar mass of Li3p

Answers

Answer:

51.79g Li₃P.

Explanation:

Li has a molar mass of 6.94 g (since there are 3, you multiply it 3 times) and P has a molar mass of 30.97 g. 6.94(3) + 30.97 = 51.79g.

What is the unit for the answer?
23.67 boops
x
0.256 snoots
35 boops
Х
520. zoinks
Х
92 snoots
2
218 snoots
34 wout
Х
2
8765 wows
345 zoinks
boops
snoots
WOWS
zoinks
wows/snoots
boops/zoinks

Answers

Answer:Answer to: A function f is defined on the interval ~[0,4], and its derivative is { e^{sinx} - 2cos3x } a. on what interval is f increasing? b....

Missing

Explanation:

What is the molecule that formed between B and F?

Answers

Answer:

Hydrogen bond strengths range from 4 kJ to 50 kJ per mole of hydrogen bonds. In molecules containing N-H, O-H or F-H bonds, the large difference in electronegativity between the H atom and the N, O or F atom leads to a highly polar covalent bond (i.e., a bond dipole).

Explanation:

What did you include in your response? Check all that
apply.
O No, thermal energy is not being transferred by
radiation in this image.
O The eggs are in direct contact with the metal pan,
which is in direct contact with the gas flame.
O Thermal energy is being transferred by conduction.
O Radiation transfers thermal energy by
electromagnetic waves.
O Radiation does not transfer thermal energy by
direct contact.

Answers

If you included all of them, check all
I’m just gonna explain it okay so if you included it in you paragraph response just check it off there is no right or wrong

How do the particies in a liquid create surface
tension?

Answers

It's been a while since I've taken Chemistry but here's what I know:

There are small, weak bonds that form between water molecules. These bonds make it so liquid molecules (water, in this example) cannot move as freely as a gas, but their bonds aren't nearly as strong as a solid. The bonds are formed when a hydrogen atom is attracted to an oxygen atom (because they have an opposite charge). This bond plus the gas molecules hitting the water causes surface tension.

(Let me know if this is wrong and I hope you have a lovely day!!)

PLZ FASTLEY ANSWER The images show two metamorphic rock samples.


Left: light colored rock with coarse texture. Right: red and white rock with rounded grains and coarse texture.


Which statement accurately describes these rocks?


Both rocks are non-foliated.

Neither rock has randomly arranged grains.

Both rocks formed at Earth’s surface.

Neither rock formed through extreme heat or pressure.

Answers

Answer:

a

Explanation:

From the given images, it is clear that both rocks are non-foliated rocks because they don't have distinct repetitive layers.  Hence option a is correct.

What are metamorphic rocks?

Metamorphic rocks are formed through intense pressure and heating from the sedimentary or igneous rocks. Sometime the change n heat or pressure make the metamorphic rocks gets foliated.

Foliation occurs when pressure forces flat or elongate minerals within a rock to align. These rocks form a platy or sheet-like structure that reflects the pressure direction. There is no platy or sheet-like structure in non-foliated metamorphic rocks.

Non-foliated rocks can be created in a variety of ways. Some rocks, like limestone, are composed of minerals that are not flat or elongate. Therefore, the given rocks are non-foliated.

To find more on foliated rocks, refer here:

https://brainly.com/question/1984747

#SPJ2

b. How do metals and non-metals differ chemically?
1​

Answers

Non metals can not give electrons to hydrogen in water to be released as H2 gas

how do you separate immiscible and miscible liquid​

Answers

Answer:

A mixture of immiscible liquids is separated by using an apparatus called separating funnel. (i) Separation by fractional distillation : Fractional distillation is the process of separating two (or more) miscible liquids by distillation, the distillate being collected in fractions boiling at different temperatures.

Explanation:

hope this sorta helps you -.-

HELP ASAP
1. a hurricane destroyed an entire city, what category would it most likely be?

a Category 4 or 5


b Category X or Y


c Category 1 or 2

d Category A or B
2. What happens immediately after a hurricane makes landfall?

a It starts hailing.


b Its winds pick up speed.


c It gets stronger.


d It gets weaker.

Answers

Answer:

1. category 4 or 5

2. it gets weaker

What is mass movement give examples

Answers

Answer: Mass wasting is the movement of rock and soil down slope under the influence of gravity. Rock falls, slumps, and debris flows are all examples of mass wasting.

3. Which of the following is an example of a polyatomic ion?
a. NO
b. OP-
C. CI
d. Ca²+​

Answers

Answer:D

Explanation:polyatomic means more then one and it have more then 1 positive ion

Answer: B

Explanation:

A polyatomic ion needs to have two atoms, hence the word “poly,” so D and C are NOT correct. An ion also needs to be charged, so that makes B the correct answer.


CH(4)+ 20(2)→ CO2+ 2H(2)O

22.
The reaction shown above is an example of a -

a. synthesis reaction
b. combustion reaction
c. decomposition reaction
d. double displacement reaction

Answers

Answer:

Reaction is a Combustion reaction

10.0 grams of a gas occupies 12.5 liters at a pressure of 42.0 mm Hg. What is the volume when the pressure has increased to 75.0 mm Hg? 6.72 L 7.00 L 22.3 L 0.143 L

Answers

Answer:  7.00 L

Explanation:

Boyle's Law: This law states that pressure is inversely proportional to the volume of the gas at constant temperature and number of moles.

[tex]P\propto \frac{1}{V}[/tex]     (At constant temperature and number of moles)

[tex]P_1V_1=P_2V_2[/tex]  

where,

[tex]P_1[/tex] = initial pressure of gas  = 42.0 mm Hg

[tex]P_2[/tex] = final pressure of gas  = 75.0 mm Hg

[tex]V_1[/tex] = initial volume of gas   = 12.5 L

[tex]V_2[/tex] = final volume of gas  = ?

[tex]42.0\times 12.5=75.0\times V_2[/tex]  

[tex]V_2=7.00L[/tex]

Therefore, the volume  when the pressure has increased to 75.0 mm Hg is 7.00 L

1. Shankar and Sameer performed an experiment to differentiate primary, secondary and tertiary amines in a laboratory.Shankar correctly identified those 3 compounds but Sameer could only identify primary amine. a) What may be the reagent used by Sameer 1) Ammonical Silvernitrate solution 2) Chloroform & Caustic potash 3) Aqueous Copper Sulphate solution

Answers

Answer: 2) Chloroform & Caustic potash

Explanation:

The carbylamine reaction is a kind of chemical test which is done to detect primary amines in an unknown solution. It cannot detect secondary and tertiary amines.

The reaction involves the heating with up of the unknown solution with alcoholic potassium hydroxide or caustic potash and the chloroform.

In the presence of primary amine, the production of isocyanide results.

what happens when thermal energy is added to a substance?

Answers

Answer:

Explanation:

I believe that particles would move more faster and more thank likely increase kinetic energy when thermal energy is added to something.

The two rate statements below are not the same. Use the concept of unit rates to explain
the difference.
a. LaVerne earns $10 in 2 hours.
b. Shirley earns $2 in 10 hours.

Answers

It’s definitely B but I’m not sure

What is the force of attraction between two atoms that are combined?

a. chemical bond
b. atomic bond
c. physical property
d. magnetic bond

Answers

Answer:

a

Explanation

Chemical bond refers to the forces holding atoms together to form molecules and solids. This force is of an electric nature, and the attraction between electrons of one atom to the nucleus of another atom contributes to what is known as chemical bonds.

The PC modem was invented in what year?​

Answers

Answer:

1977

Explanation:

Getting connected: a history of modems. Then, in 1977, Dale Heatherington and Dennis Hayes created the world's first PC modem, the 80-103A.

fountain
21. Calculate the quantity of electricity
in coulombs used when a current of
2.7 ampere is passed through a
solution of silver salt for 25 minutes
20 seconds
A. 87.5
B. 206
C. 1350
D. 4050
E. 4104

Answers

Answer:

4104 Coulombs

Explanation:

charge = time(sec) *current

25*60 =1500+20=1520

2.7A * 1520 sec =4104

4104 C

I’ll marmark you brainlist

Answers

it's B! hope this helped! <3

Airplanes typically fly at an altitude of about 10,000 meters. At this altitude the atmospheric pressure is significantly less than it is at sea-level. Because of this, airplane cabins must be pressurized so that the people on board can continue to get enough oxygen. If a typical 747 has a volume of 28,000 m3 and is filled with air at 101.3 kPa on the ground, what is the new volume of air inside when the cabin is pressurized to 75 kPa once it is in flight?

Answers

Answer:

37,818.67 m3

Explanation:

The pressure a gas will exert on a container is inversely proportional to the volume of the gas. According to Boyle's law, at a constant temperature, the pressure of a gas is inversely proportional to its volume. The law can be mathematically represented thus:

   P1V1 = P2V2

In this case, P1 = 101.3 kPa, V1 = 28,000 m3, P2 = 75 kPa, V2 = ?

V2 = P1V1/P2

         =    101.3 x 28,000/75

                = 37,818.67 m3

Hence, the new volume of the air inside the cabin after pressurizing would be 37,818.67 m3.

A recipe calls for 0.8 oz of cheese. If I make 35 batches of this recipe, how many ounces of cheese do I need?

Answers

The answer is 28 oz you just multiply 35 and .8
Other Questions
Where are instructions for making cell parts found in a cell? Write an equation of the line that passes through the points (0, 5) and (4, 7). IM FAILING MY MATH CLASS PLZ HELP!!!!!!!!BRAINLIESTDante deposits $300 to open a savings account. He will earn 2% each year on his money. If he makes no deposits or withdrawals, how much money will Dante earn in interest in 1 year? How much money will be in the account after 4 years?What is the interest rate? A golem is a creature made to serve a special purpose. It follows its creators commands. How does the creator make it?A. It consists of certain minerals and gains life when the creator transfers a human soul into it.B. It consists of certain minerals and gains life when the creator sacrifices a human in its name.C. It consists of certain minerals and gains life when the creator performs certain magical procedures.D. It consists of certain minerals and gains life when the creator offers precious gems and jewels to it. help asap, this topic is about immigration Choose a theme and write a paragraph that states your own interpretation of that theme in Raymonds Run. Be sure to provide evidence and an explanation of your evidence. Look at this table:-192211816Is this relation a function?yesno 1 ptsQuestion 9Which of the following is NOT true of the image shown below?3 CO,ADPOZATPADPNADPHNADP3 carbonsimple sugarThe process is light dependent there are 14 crayons and 30 markers in a pencil box. what is the ratio of crayons to marker The different processes that an animal, such as an insect,goes through as it grows and reproduces is called its Why is blue called blue? The numbers 32 and 12 are each rounded to the nearest ten and then multiplied to estimate the product. What is thebest estimate of 32 x 12 based on this method?0 300O 384O 400O 424Mark this and retumSave and ExitNextSubmit Easy question? Please help Ill give brainliest! :( Please provide small explanation like instructions its okay if not though I NEED HELP WITH MY WORK PLZ HELP ME!!!!!! :'( Prior to World War 1 which country had the most extensive overseas empire? help reertertewrtewrtetewtwretw5trt The question is below the screen Select the word that best completes the sentence.The crowd in the end zone displayed theirby wearing their school colors.O deceptiono slanderO tolerancepartisanship What are two reasonsthat the global rate has decreased Heather has an international cell phone plan.The number of texts she sent in September can be represented by x. She pays $30 per month plus $0.05 per text.Her bill for September was $60.What is x, the number of texts Heather sent during the month of September?60?600?1,800?180?