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
What is the net ion charge of Beryllium?​
KATRIN_1 [288]

Explanation:

Beryllium is a group 2 element and its atomic number is 4. Electronic configuration of beryllium is 1s^{2}2s^{2}.

Since, a beryllium contains two valence electrons so, in order to attain stability it will readily lose its 2 valence electrons.

Therefore, a beryllium atom upon losing two valence electrons will acquire a +2 charge.

Thus, we can conclude that the net ion charge of Beryllium is +2.

7 0
3 years ago
How do radiography and sonography compare?
lara [203]
Radiography techs are trained to operate medical equipment that uses X-rays and other types of radiation. Ultrasound techs, referred to professionally as diagnostic medical sonographers, operate equipment that uses high-frequency sound waves to create images.

(Credits to google)
8 0
4 years ago
Read 2 more answers
At standard pressure, the difference between the freezing point and the boiling point of water, in Kelvin degrees, is D. 373 A.
zepelin [54]
Your answer would be A.100 
 
                                       

6 0
3 years ago
A) if each substance above is heated at the same rate and same mass, which of the above has a smaller specific heat? how do you
aliya0001 [1]

Answer:

I think B would be alcohol but A I'm not to sure

5 0
3 years ago
Determine the number of valence electrons for aluminum through the use of this table.
julia-pushkina [17]
There appears to be no table shown, but I can still answer. Aluminum has 3 valence electrons 
3 0
4 years ago
Read 2 more answers
Other questions:
  • Show the ________ or the outer level of electrons, the number which is given
    13·1 answer
  • The following image is an example of a __________ and is a __________ because the __________ are all __________.
    8·1 answer
  • Which of the following collection is the more positive view of life and society in Blake's time?
    5·2 answers
  • Which of the following is the most likely sign that a chemical change has happened?
    12·1 answer
  • What does centripetal force mean?
    8·1 answer
  • If hydrochloric acid has a [H+] of 1.2 x 10-2 M, what is the pH?<br> 1.9<br> 0 1<br> 1.2<br> O<br> 8
    14·2 answers
  • Guys please I need an answer for this asap
    7·1 answer
  • Ice melting in a glass of iced tea is an example of a(n) __________ process (not necessarily a chemical reaction).
    13·1 answer
  • Is there more than one possible model that could be inferred from Rutherford’s data?
    7·2 answers
  • What is a spectrochemical series and it's function
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!