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

What would happen if a neutron was added to Lithium (7)

Answers

Answer:

if you add a neutron to lithium-7 it becomes a compound nucleus of lithium-8

what everyday things turn green because acid

Answers

Coins or anything copper

Explanation
They are everyday objects that turn green.

How many atoms are in HCOOH₂?

Answers

Answer:

11 atoms I think

Explanation:

Answer: 3

Explanation:

I took the test!!

The most concentrated solution from among those listed is

Answers

The most concentrated solution is the 0.25 M KCl

Cannot be chemically broken down into simpler substances

Answers

An element is the simplest form of matter that has a unique set of properties.  Elements cannot be broken down into a simpler substance. Likewise, one element cannot be chemically converted into a different element.

HOPE THIS HELPS

Answer:

element

Explanation:

Because

2H2O2
1. Number of hydrogen atoms in chemical formula 1.

Answers

Answer:

А  There are two peroxide molecules on the reactant side.

The statement is correct because the left hand side is the reactant side. We can read the reaction as;

  2 molecules of hydrogen peroxide decomposed  to given 1 molecule of oxygen gas and 2 molecules of water .

D Mass must be conserved so there are an equal number of molecules in the reactants and products.

E Mass must be conserved so there are an equal number of atoms in the reactants and products.

Since the chemical equation is balanced, choices D and E are correct. The reaction will have equal number of molecules and atoms on both sides of the expression.

Explanation:

Some of the energy given off by the sun is in the form of _________ and ________energy

Answers

Answer:

All of the energy from the Sun that reaches the Earth arrives as solar radiation, part of a large collection of energy called the electromagnetic radiation spectrum. Solar radiation includes visible light, ultraviolet light, infrared, radio waves, X-rays, and gamma rays.

Explanation:

Solar radiation and electromagnetic energy????? Lol sry if I’m wrong but I’m pretty sure I’m right

A bus travels 20km in 30 min what is the average speed of the bus

Answers

Answer:

40km/h

Explanation:

v=20km/0.5h=40km/h.

Answer:

average speed=distance/time

speed=20/30

speed=2/3

What is Zeff of phosphorus

Answers

Answer:

Explanation:

Here is an illustration showing how to "calculate" +5 as the effective nuclear charge (Zeff) for phosphorus. We are not implying that the electrons are in orbits here, this is simply showing inner shell electrons that shield the outer valence electrons from the full nuclear charge.

We have that The effective nuclear charge Z_{eff} of 3p electron in phosphorus atom is discovered to be approximately 4.80

[tex]Z_{eff}=4.8[/tex]

It is important to note that the Z_{eff} of an element can be defined simply as the average positive charge felt by an shell electron in an atom from the various electrons around it

Hence

The effective nuclear charge Z_{eff} of 3p electron in phosphorus atom is discovered to be approximately 4.80

For more information on this visit

https://brainly.com/question/13025901?referrer=searchResults

Which property or properties can change when the pressure of a gas changes?

Answers

Answer: This law states that the volume and temperature of a gas have a direct relationship: As temperature increases, volume increases, when pressure is held constant. Heating a gas increases the kinetic energy of the particles, causing the gas to expand

Explanation:

According to this law, a gas's volume and temperature are directly correlated: When pressure is held constant, volume rises as temperature rises. The kinetic energy of the particles in a gas increases when it is heated, which causes the gas to expand.

What rules apply to gases?

According to Boyle's Law, when the temperature and mass are both constant, the volume of a given volume of gas sustained at a constant temperature varies inversely with the applied pressure.

The quantity of gas particles, the volume of the container, and the temperature of the gas all affect the pressure of a gas that is confined. The pressure will rise as the amount of gas particles in a container increases. The pressure will rise as a container's volume increases.

To learn more about rules apply to gases refer to:

https://brainly.com/question/25290815

#SPJ2

A can of cola contains approximately 240 calories. If you consume two cans of cola each day for one week, approximately how many calories did you consume from cola?
Select one:
a. 3,400 calories
b. 70 calories
c. 1,700 calories
d. 480 calories

Answers

Answer: 3,400 calories
Well if you do 240 x 2 you get 480 and if you multiply it you get 3360

You don’t specify whether we round that number or you don’t specify whether we calculate the calories consumed weekly or daily

How do we get heat from the sun?

Answers

Answer:

When the Sun's energy moves through space, it reaches Earth's atmosphere and finally the surface. This radiant solar energy warms the atmosphere and becomes heat energy. This heat energy is transferred throughout the planet's systems in three ways: by radiation, conduction, and convection.

Explanation:

Answer:

The sun radiates energy in all directions. Most of it dissipates into space, but the tiny fraction of the sun's energy that reaches Earth is enough to heat the planet and drive the global weather system by warming the atmosphere and oceans. The delicate balance between the amount of heat Earth receives from the sun and the heat that Earth radiates back into space makes it possible for the planet to sustain life.

Hopefully, this helps you out!

A solution is

Question 6 options:



a homogeneous mixture.




a compound.




chemically separable.




a heterogeneous mixture.

Answers

Answer:

the first one. a homogeneous mixture.

Explanation:

hope this helps :)

manganese atom has 30 neutrons and atomic number 25
determine the electron cloud charge of manganese​​​

Answers

Answer:

the most common oxidation no.of manganese is + 2 + 3 + 4 + 6 + 7

the transfer of energy by waves is also known as _______

Answers

Answer:

wave

Explanation:

'Wave' is a common term for a number of different ways in which energy is transferred: In electromagnetic waves, energy is transferred through vibrations of electric and magnetic fields.

i hope this helps and your welcom

Choose two different particles found in the air. Explain how they are different and how they are the same

Answers

Answer:

Dust and smoke.

Explanation:

Dust and smoke are two different particles present in the air. Dust and smoke are different from one another due to their origin. Smoke formed from burning of materials while dust refers to the soil particles lifted by the wind due to their light weight. Dust and smoke are similar to each other due to their small in size, infinite number means uncountable and light weight.

Air is a mixture of gases and consists of dust particles and water vapor. It consists of small to very large size of particles. Some of them include dust pollen, soot, and liquid droplets.

Dust and soot particles of the air are different as the soot is a fine black particle of carbon and tar. It is made by the incomplete combustion of air. While dust is fine dry particles of matter.

Hence they both differ.

Learn more about the two different particles found in the air.

brainly.in/question/35683807.

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

Use the graph to determine the instantaneous speed at 2 seconds.

What is the average speed over the entire trip?

Answers

Answer:

The instantaneous speed at 2 seconds =

3 m/s

The average speed over the entire trip is

2 m/s

Explanation:

Answer above is wrong and doesn't state anything about the answer, so this is the correct answer hope this helped! :)

Answer:

1.) 3 m/s   2.) 2 m/s

Explanation:

I hope this helps!!

Is the chemical reaction between magnesium metal and hydrochloric acid solution an acid base reaction?

Answers

Answer:

No

Explanation:

The chemical reaction between magnesium metal and hydrochloric acid solution is not an acid - base reaction.

An acid - base reaction involves an acid and base to produce salt and water.

This reaction is called a neutralization reaction. An acid is a substance that produces excess hydroxonium ions in solutions. A base produces excess hydroxyl ions in solution. When acids and base combines, the main product is a salt in water solution.

two or more atoms joined together form a _____

Answers

Answer:

It makes a molecule

Explanation:

A positive ion is —————-than its parent atom?

Answers

Answer:

positive ions are smaller than their parent atoms and negative ions are larger than their parent atoms.

0.025 millimeters is the same as how many liters?​

Answers

Answer:

2.5e-5

Explanation:

Convert 0.025 Milliliters to Liters (ml to L) with our conversion calculator and conversion tables. To convert 0.025 ml to L use direct conversion formula below. 0.025 ml = 2.5E-5 L.

A block is pulled 0.90 m to the right in 3.75 s.


What is the block’s average speed to the nearest hundredth of a m/s?

Answers

Answer:

0.36 m/s

Explanation:

im in 8th grade in honors science and i think, since u have distance and time you have to divide distance by time

What would happen to the rate of a reaction with rate law rate = k [NO]^2[H2] if
the concentration of NO were halved?
A. The rate would be four times larger.

B. The rate would also be halved.

C. The rate would be one-fourth.

D. The rate would be doubled.

Answers

The rate of a reaction would be one-fourth.

Further explanation

Given

Rate law-r₁ = k [NO]²[H2]

Required

The rate of a reaction

Solution

The reaction rate (v) shows the change in the concentration of the substance (changes in addition to concentrations for reaction products or changes in concentration reduction for reactants) per unit time.  

Can be formulated:  

Reaction: aA ---> bB  

[tex]\large{\boxed{\boxed{\bold{v~=~-\frac{\Delta A}{\Delta t}}}}[/tex]

or  

[tex]\large{\boxed{\boxed{\bold{v~=~+\frac{\Delta B}{\Delta t}}}}[/tex]

The concentration of NO were halved, so the rate :

[tex]\tt r_2=k[\dfrac{1}{2}No]^2[H_2]\\\\r_2=\dfrac{1}{4}k.[No]^2[H_2]\\\\r_2=\dfrac{1}{4}r_1[/tex]

Answer:

C. The rate would be one-fourth.

Another option would be:

The rate would be four times larger

Depending on what class you're taking.

Explanation:

how is the strength of an acid affected by the number of hydrogen ions it contains​

Answers

Answer:

The greater the number of hydrogen ions, the increase in the acid strength.

Explanation:

Hydrogen ions determine the pH of the acid, greatest number of hydrogen ions give the pH value below 4 hence strong acid, and least number of hydrogen ions give a pH value above 4 but less than 7 hence a weak acid

Part of an important cellular process involving a DNA strand is modeled below
12000
What is the purpose of this cellular process?
F Preserving genetic information for future generations
G Deleting the information in the sequence produced from the DNA template
# Transcribing information in the DNA sequence for use by the cell
J Producing more nucleotides for the DNA sequence

Answers

Answer: transcribing information to the dna sequence for use by the cell

Explanation:

which of the following is an example of an electromagnetic wave A. an ocean wave B. A sound wave C. A light wave D. A wave traveling along a rope

Answers

Answer:

Light waves

Explanation:

It isn't sound because it isn't infrared, involve electromagneticism, or light/radiation. An ocean wave is a literal wave of water, and a wave traveling along a rope is way off course. Choose a light wave. Also, brainliest would be nice. Glad to help

You discovered a new compound with the following formula: H(O) Pe. Using the information below, what would be the correct name for this compound?
*H(O) is an Alkaline Earth Metal.
*Pe is classified as a Halogen.

Answers

Answer:

Home personide.

Explanation:

In relation of Magnesium and Chlorine, MgCl2 is called Magnesium chloride

What is the kinetic energy of 3500 kg bus that is moving at 25 m/s

Answers

Answer:

1093750 J

Explanation:

The kinetic energy of an object can be found by using the formula

[tex]k = \frac{1}{2} m {v}^{2} \\ [/tex]

v is the velocity

m is the mass

From the question we have

[tex]k = \frac{1}{2} \times 3500 \times {25}^{2} \\ = 1750 \times 625 \\ = 1093750 \: \: \: \: \: [/tex]

We have the final answer as

1,093,750 J

Hope this helps you

PLEASE ILL GIVE YOU BRAINLY
What prevents charge buildup in a galvanic cell?
A. An electrolyte
B. A salt bridge
C. An electrode
D. A battery

Answers

Answer:

B is the answer

Explanation:

A salt bridge is necessary to keep the charge flowing through the cell. Without a salt bridge, the electrons produced at the anode would build up at the cathode and the reaction would stop running.

Other Questions
Peter has a vitamin deficiency, a skin problem, brain damage, and a chronic liver problem due to his chronic substance abuse of which drug? Mercutio laughs at scars, but he never felt a wound. 1.Who said this? Why? 2. What did they really mean? Explain in detail. 3. Which literary device. Answer each one, 1, 2 and 3 with 5 SENTENCES If an artist has been studying and practicing to apply design principles to her art, which of these will be the most likely result?Her employer will trust her with jobs that must be done quickly: THE CORRECT ANSWER IS AShe will always have plenty of workShe will spend hours contemplating great art worksShe will invent new ways of using the principles 6.5 Fish PopulationThe number of fish in a lake decreased by 25% between last year and this year. Last yearthere were 60 fish in the lake. What is the population this year? If you get stuck, considerdrawing a diagram. YZ VX . Find WX. 34 16 8 Y Z W X V WX = What are two important criteria for determining your appropriate exercise frequency? I am writing an essay about freedom of speech and if a person has hateful speech towards others, should it be considered as something that should be legal? I agree with this and wrote this. do you wanna maybe check it or make it better? What is the first thing that immigrants at Ellis Island encountered once they got off the ship? A perfect competition has____sellersA. ManyB. No C. One How do nightly network news programs compare and contrast with weekly newsmagazines? The art club had an election to select a president. 40% of the 85 members of the club voted in the election. How many members voted? What does the root "phone" mean in the word "telephone"?this homework Can someone help me please? If new experimental findings contradict a scientific theory, what might happen to the theory?A. The new evidence could be accepted and the theory changed.B.The theory could become law.C.The theory could stay, ignoring the new evidence. D.The new evidence could be rejected because it does not support the theory. GO LOOK AT MY LAST QUESTION PLEASE!!ITS VERY HARD!!! in the phloem, what goes out?. find the slope of the line y=-1/4x+9 Demonstrative Adjectives, help Help me please Im confused What is the following quotient?StartFraction StartRoot 96 EndRoot Over StartRoot 8 EndRoot2 StartRoot 3 EndRoot42 StartRoot 22 EndRoot12