/*--------------------------------------------------
created by smtuttle at Thu Nov 10 13:21:26 PST 2016
--------------------------------------------------*/
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
using namespace std;


/*--------------------------------------------------
 signature: vertical : string -> int
 purpose: expects a string, and returns the length of
    that string, AND has the side-effect of
    printing that string to the screen in a "vertical"
    style, one character per line

 examples: vertical("moo") == 3
     and have the side effect of printing to the screen:
 m
 o
 o
 
     vertical("do") == 2
     and have the side effect of printing to the screen:
 d
 o
 
--------------------------------------------------*/

int vertical(string desired_msg)
{
    int position = 0;

    int msg_len = desired_msg.length();

    while (position < msg_len)
    {
        cout << desired_msg.at(position) << endl;
        position = position + 1;
    }

    return msg_len;
}