Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

pls halp

Name: Anonymous 2010-12-15 4:32

Bros. BROS. Why wont 'x' exit proper? WHERE DID I GO WRONG
[code]#include <stdio.h>

/* DINGA LINGA DOO!!! */

int derp();

main()
{
    int c = 0;
    int leaf = 0,rock = 0;
    int i;

printf("random text.\n");
    while ((c = getchar()) != EOF)
        if (c == 'l')
            ++leaf;
        else if (c == 'r')
            ++rock;
        else if (c == 'z')
            derp();
        else if (c == 'x')
            printf("Goodbye, world!\n");
            return 0;
        else
            printf("leaf:%d\trock:%d\n", leaf, rock);
}

int derp()
{
    printf("random text.\n");
    return 0;
}[/code[

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List