It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

ASCII Converter

Moderator: dafunkymunky

ASCII Converter

Postby gloradow on Sun Nov 07, 2010 3:42 am

I am trying to make a program where you can have seceret writing or ASCII I should say. I have a code in C++ but I want to get it in VB. I got the design and everything but I just don't know how to code it. I am new to VB..... Here is what the program looks like Image Here is the ASCII code for C++
    Code: Select all
    #include <stdio.h>
    #include <ctype.h>

    int main () {
      char inputbuffer[200];
      int number;
      char letter;

      do {
        printf ("\n(E)ncode or (D)ecode : ");
        scanf ("%200s", inputbuffer);

        switch (toupper(inputbuffer[0])) {
          case 'D':
            printf ("Type the Message to decode.h\n");
            do {
              scanf ("%d", &number);
              scanf ("%c", &letter); // catch control characters
              printf("%c", number);
            } while (letter != '\n');
            break;
          case 'E':
            printf ("Type the Message to encode\n");
            do {
              scanf ("%c", &letter);
            } while (letter == '\n'); /* clear out the linefeeds. */
            while (letter != '\n') {
              printf("%d ", letter);
              scanf ("%c", &letter);
            }
            break;
          default:
            printf ("Invalid option\n");
        }
        printf ("\nAgain? (Y/N) : ");
        scanf("%200s", inputbuffer);
      } while ((toupper(inputbuffer[0]) != 'N') && (toupper(inputbuffer[0]) != 'Q'));

      return 0;
    }
If you can help me I will really like it....
gloradow
 
Posts: 1
Joined: Sun Nov 07, 2010 3:35 am

Who is online

Users browsing this forum: No registered users and 5 guests