Menu

switching from numbers to letters

2002-12-09
2012-09-26
  • Nobody/Anonymous

    I know how to display letters, but i don't know how to switch form numbers to letters.  example...

    what is your name:

    what is your girlfriend's name:

    equals

    true love

    ...how do you put a name in after it asks for a name....sorry so stupid...thanks

     
    • Nobody/Anonymous

      Ok, going with the last part of your questuion "how do you put a name in after it asks for a name"...

      This is a very simple little program to do a single input. This is only in hope it will give you some idea of how to do this. This is C++, it could be done as well in C ect, also input like this can be done in other ways as well: This is only one way, i did it this way because it shows more of whats going on.

        j@ck_

      #include <iostream>
      #include <cstdlib>

           using namespace std;

      int main( )
        {
       
        char Name[80]; //..character array with up to 80 characters

       
        cout << " Enter your name: " ;
        cin >> Name ;                 // ... single input
       
        cout << Name << endl;         // ... single output to screen
       
           system("PAUSE");          // .. uses <cstdlib> above, to stop the program from closing.
          return 0;
        }

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.