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]
4 years ago
7

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

Chemistry
2 answers:
Masteriza [31]4 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]4 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
Suppose an enzyme and its substrate obey the lock and key model of enzyme catalysis. Which of the following would be true of the
Maurinko [17]

Answer:

only one substrate could be converted to product by the enzyme

Explanation:

If an enzyme obeys the lock and key model, it then follows that the design of the enzyme is unique to a particular substrate.

Just as only the correct key can effectively fit into a lock, only the appropriate substrate whose design matches that of the enzyme can fit into the enzyme.

Owing to the lock and key model of enzyme activity, only one enzyme could interact with a substrate to yield particular product.

4 0
3 years ago
How can Newton’s laws be experimentally verified?
vekshin1

Answer:

Newton's second law of motion is F = ma, or force is equal to mass times acceleration. Learn how to use the formula to calculate acceleration

Explanation:

6 0
3 years ago
Do you think that there is a high correlation between proficiency in mathematics and proficiency in chemistry? Explain why or wh
ddd [48]
I think so, <span> how much of all chemistry is to do with numbers? A lot! So being good at mathematics makes a huge aspect of chemistry so much easier but if you aren't mathematical then you can work at it and become reasonably proficient at it.</span>
7 0
3 years ago
A student conducts an experiment to determine how the temperature of water affects the time for sugar to dissolve. In each trial
Blababa [14]

What is wrong with the experimental design is that the student changed more than one independent variable.

WHAT AN EXPERIMENT SHOULD CONTAIN?

  • An experiment is a procedural method of solving a scientific problem or answering a scientific question. An ideal experiment should contain two variables namely: independent variable and dependent variable.

  • Dependent variable: This is the variable that the experimenter measures in the experiment. The dependent variable responds to changes made to the independent variable.

  • Independent variable: This is the variable that is manipulated in an experiment in order to bring about a response.

In the experiment conducted by the student in this question in order to determine how the temperature of water affects the time for sugar to dissolve. The independent variable is the DIFFERENT TEMPERATURE OF WATER while the dependent variable is the TIME TAKEN FOR SUGAR TO DISSOLVE.

N.B: An experiment should have only one independent variable and all other variables should be kept constant. This is to have a reliable result.

  • However, this student used two independent variables (temperature and amount of water) for the experiment, which is wrong for the experimental design.

Therefore, the fact that the student changed more than one independent variable is wrong for the experimental design.

Learn more: brainly.com/question/967776

4 0
3 years ago
What is the charge on copper in CuSO4?
yKpoI14uk [10]
<h2><em><u>HIII</u></em></h2><h2><em><u>HERE'S</u></em><em><u> </u></em><em><u>YOUR</u></em><em><u> </u></em><em><u>ANSWER</u></em><em><u> </u></em></h2>

<h2 />
  • copper sulfate is an ionic compound whose overall charge is zero.
  • The copper ions have a +2 charge.
  • The sulfate ions have a -2 charge.

<h2><em>HOPE</em><em> </em><em>IT</em><em> </em><em>HELPS</em><em> </em><em>YOU</em><em> </em><em>OUT</em><em> </em><em>PLEASE</em><em> </em><em>MARK</em><em> </em><em>IT</em><em> </em><em>AS</em><em> </em><em>BRAINLIEST</em><em> </em><em>AND</em><em> </em><em>FOLLOW</em><em> </em><em>ME</em><em> </em><em>PROMISE</em><em> </em><em>YOU</em><em> </em><em>TO</em><em> </em><em>FOLLOW</em><em> </em><em>BACK</em><em> </em><em>ON</em><em> </em><em>BRAINLY.IN</em><em> </em></h2>
7 0
3 years ago
Other questions:
  • Which factor can increase solubility?
    6·1 answer
  • The concentration of carbon monoxide in an urban apartment is 48 g/m". What mass of carbon monoxide in grams is present in a roo
    10·1 answer
  • Calculate the Gibbs energy of freezing (DeltaGfreezing) in units of J/mol when supercooled water freezes at -3degreeC at constan
    12·1 answer
  • The specific heat of aluminum is 0.125 cal/g °C. If 12.5 grams of aluminum were heated from 20.0 °C to 100.0 °C, calories of hea
    6·2 answers
  • which of the following true? a_volcanoes and earthquakes often near the plate boundaries. b_volcanoes occur whereve there are ta
    5·2 answers
  • What does heliocentric mean
    10·2 answers
  • Sarah spilt a bottle of ammonia in one corner of the laboratory. Soon the whole laboratory was filled up with pungent irritating
    10·1 answer
  • Use the following information S(s)+O2(g)→SO2(g), ΔH∘ = -296.8kJ SO2(g)+12O2(g)→SO3(g) , ΔH∘ = -98.9kJ to calculate ΔH∘f for H2SO
    12·1 answer
  • True or false gasses can apply a force on an object
    6·2 answers
  • You and your family have just arrived in Water Cycle Land. You are going on a new ride called the Water Cycle. You sit in your s
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!