rihanahayatu
rihanahayatu rihanahayatu
  • 30-12-2020
  • Computers and Technology
contestada

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

Respuesta :

MoatazMahmoud817
MoatazMahmoud817 MoatazMahmoud817
  • 30-12-2020

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;

}

Answer Link

Otras preguntas

adam bought abox of fruit that weighed 6 3/8 kilograms if he bought a second box that weighed 7 2/5 kilograms ,what is the combined
The way a chef prepares a food dish affects __________. A. How many nutrients are actually in a dish B. The number of calories in a dish C. The amount of dressi
if f(x)=3/x+2 -square root sign x-3 complete the following statement the domain for f(x) is all real numbers ____ than or equal to 3
Does matrix resurrections have a post credit scene?
Help with these problems please, DUE T O D A Y !!!! I’ll try to make you guys brainlist who ever answers first
I'm just so ANGRY AND CONFUSED UGH Id k whAt to do ik i need to just move on but like f the things he said when he ended it f-g hurt when is it my turn to be
Explain why you cannot see your face on a plane paper.​
What is the primary crop in Ukraine
Some athletes like runners or sprinters may train by attaching a small parachute to their upper body. The parachute opens behind them as they run, resulting in
what is the distance from point b to point d? a. 5 units b. 6 units c. 7 units d. 8 units