<n_*******@yaho o.comwrote:
>i have an program but i don't know how to do it problem is enter a and
z character and digits 0to9 using switch statement then display
morsecode equivalent of character entered
Does this help?
Given the right headers and using directive and that ch is a char and
contains a value suitable for conversion.
switch (ch)
{
case 'a' : cout << ".-\n"; break;
case 'b' : cout << "-...\n"; break;
...
}
It's conceivable that in some situations the \n has to be replaced with
endl. A lot more typing and you have enough typing ahead of you already
without adding that.
------
A less typing intensive solution would be to use a two dimensional array of
char. But your course probably hasn't gotten that far yet.