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
Olegator [25]
3 years ago
7

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

Chemistry
2 answers:
Masteriza [31]3 years ago
6 0

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;  

}

VARVARA [1.3K]3 years ago
6 0

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;

}

You might be interested in
25.88 grams of tin (ll) phosphate reacts with 31.73 grams of zinc.
Dovator [93]

Explanation:

Zn + Sn3(PO4)4 = Zn3(PO4)2 + Sn - Balanced Chemical Equation

4.3 is limiting

is the answer

if you like my answer please like comment and mark me as brilliant

6 0
2 years ago
When a student mixes 50 mL of 1.0 M HCl and 50 mL of 1.0 M NaOH in a coffee-cup calorimeter, the temperature of the resultant so
zmey [24]

Answer: 54.4 kJ/mol

Explanation:

First we have to calculate the moles of HCl and NaOH.

\text{Moles of HCl}=\text{Concentration of HCl}\times \text{Volume of solution}=1.0M\times 0.05=0.05mole

\text{Moles of NaOH}=\text{Concentration of NaOH}\times \text{Volume of solution}=1.0\times 0.05L=0.05mole

The balanced chemical reaction will be,

HCl+NaOH\rightarrow NaCl+H_2O

From the balanced reaction we conclude that,

As, 1 mole of HCl neutralizes by 1 mole of NaOH

So, 0.05 mole of HCl neutralizes by 0.05 mole of NaOH

Thus, the number of neutralized moles = 0.05 mole

Now we have to calculate the mass of water:

As we know that the density of water is 1 g/ml. So, the mass of water will be:

The volume of water = 50ml+50ml=100ml

\text{Mass of water}=\text{Density of water}\times \text{Volume of water}=1g/ml\times 100ml=100g

Now we have to calculate the heat absorbed during the reaction.

q=m\times c\times (T_{final}-T_{initial})

where,

q = heat absorbed = ?

c = specific heat of water = 4.18J/g^oC

m = mass of water = 100 g

T_{final} = final temperature of water = 27.5^0C

T_{initial} = initial temperature of metal = 21.0^0C

Now put all the given values in the above formula, we get:

q=100g\times 4.18J/g^oC\times (27.5-21.0)^0C

q=2719.6J=2.72kJ

Thus, the heat released during the neutralization = 2.72 KJ

Now we have to calculate the enthalpy of neutralization per mole of HCl:

0.05 moles of HCl releases heat = 2.72 KJ

1 mole of HCl releases heat =\frac{2.72}{0.05}\times 1=54.4KJ

Thus the enthalpy change for the reaction in kJ per mol of HCl is 54.4 kJ

6 0
3 years ago
Read 2 more answers
The atomic number determines the identity of the atom. True or False?
Dominik [7]
THE CORRDCT ANSWER IS TRUE
7 0
3 years ago
Read 2 more answers
A. Which line represents travel at the fastest speed? Justify your answer.__
Vikentia [17]

Answer:

Which line represents travel at the fastest speed? Justify your answer.__

b. Describe the line that should be added for an object that is not moving with respect to the chosen reference point.__

Answer the question using 5 complete sentences and the vocabulary terms; velocity, position, and distance

Which line represents travel at the fastest speed? Justify your answer.__

b. Describe the line that should be added for an object that is not moving with respect to the chosen reference point.__

Answer the question using 5 complete sentences and the vocabulary terms; velocity, position, and distance

Explanation:

5 0
3 years ago
Does a reptile play the same role as a bird in the WNV???<br> PLZ HURRY PLZ
Slav-nsk [51]
The birds could have more diseases and could pass it to other reptiles
7 0
3 years ago
Other questions:
  • What is the independent variable in this investigation and what is the dependent variable in this investigation and how do you g
    12·1 answer
  • Which statements about the structure of the periodic table are true?
    14·1 answer
  • Infer: Is the reaction below possible? Explain why or why not. H2O + NaOH NaCl + H2
    7·1 answer
  • 1) How many different charges can O or H atoms have?
    13·1 answer
  • Calculate the amount of CO2 (in kg) released when 1 kg of coal is burned. Assume that carbon content of the coal is 50% by mass.
    15·1 answer
  • Please help I will mark Brainly!
    12·1 answer
  • This answer please :)
    12·1 answer
  • PLEASEEE HELP NOW!!! 60 BRAINLIEST!!
    7·2 answers
  • Write the formula the alkenes that contain four,six,eight and ten carbon atoms​
    15·2 answers
  • Define saturated and unsaturated fats​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!