*/
If you have a PH account, you can customize your PH profile.
*/

View \MAIN.C

Convert infix notation to postfix notation

Submitted By: WEBMASTER
Rating: starstarstarstar (Rate It)


/*
        MAIN.C

        Rex Jaeshke, "C Users Journal" mach 92.

        L?nkning: MAIN.C STACK.C INTOPOST.C
*/


/* convert infix notation to postfix notation */

#include <stdio.h>

main()
{
        char    infix_str[200];
        char    postfix_str[200];
        void    intopost(const char *infix, char *postfix);

        while (1) {
                printf("Enter infix: ");
                if (*gets(infix_str) == '\0')
                        break;
                intopost(infix_str, postfix_str);
                printf("    postfix: %s\n", postfix_str);
        }
        return 0;
}

/* Fil Slut : MAIN.C */

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.