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
Murljashka [212]
3 years ago
7

Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam

e sending each character to the screen each on a separate line.
#include

#include

using namespace std;

int main()

{

Plese fill in.....thanks
Computers and Technology
1 answer:
MatroZZZ [7]3 years ago
4 0

Answer:

#include <iostream>

#include<string.h>

using namespace std;

void printCharacter(string name){

   for(int i=0;name[i]!='\0';i++){

       cout<<name[i]<<endl;

   }

}

int main()

{

   string name;

   cout<<"enter the name: ";

   cin>>name;

   printCharacter(name);

}

Explanation:

first include the two libraries iostream for input/output and string library for using the string.

then, create the main function and declare the variable type string.

cout instruction is used o display the message on the screen.

cin is used to store the value in the name variable.

after that, call the function. The program control move to the the function. In the function for loop is used to print the character one by one until end of the name.

You might be interested in
Maxwell says three things Level Two Leaders do well are:
IRINA_888 [86]

Answer:

true

Explanation:

3 0
3 years ago
A cathedral hull allows the boat to do what
Hoochie [10]
It allows power boats to have stability while cruising. The cathedral hull  is like a trimaran in terehat it has one main  and two side hulls stuck together so that has a somewhat square to rectangular shape and therefore exhibits greater stability than a single hulled boat. It became more popular with the advent of fibreglass boats in the 1960's and '70s.
5 0
3 years ago
The
saveliy_v [14]
The answer is Undo I think
4 0
3 years ago
Read 2 more answers
A(n) guiiconfatmenu is a list of commands that tell your computer what to do.
natima [27]
Yes that is right a guiiconfatmenu is a list of commands that your computer will tell you to do
3 0
4 years ago
Read 2 more answers
How do i write this in c++ = scnr.nextInt();<br> please help
LenaWriter [7]
Int whatever = scnr.nextInt();



Although usually when a class has a next* member function, it usually needs to check that there IS a next, that you haven't reached the end. Without knowing the class that scnr was instantiated from, I can't guess.
7 0
3 years ago
Other questions:
  • Who develop punch card​
    7·1 answer
  • ¿Es especial que mi cumpleaños sea el día de San Valentín?<br><br> si o no
    11·2 answers
  • It is important to create an IT security program structure that aligns with program and organizational goals and describes the o
    6·1 answer
  • There are varying definitions for the term "dumb terminal," but it often refers to the fact that the terminal has
    13·1 answer
  • computer has a 32-bit instruction word broken into fields as follows: opcode, six bits; two register file address fields, five b
    11·1 answer
  • In C please:
    5·1 answer
  • Convert the binary number into a hexadecimal number.
    7·1 answer
  • The process of bringing data or a file from one program to another is called
    5·2 answers
  • (20 points). Some matrixes have very special patterns, for example, in the following matrix, the numbers in the first row are eq
    14·1 answer
  • Ups developed software called ____ to enable u.s. customs and border protection agents to inspect packages that pass through the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!