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

Half pyramid

Name: Anonymous 2010-03-07 1:09

How can I modify this code to output a half pyramid?


printf("Height\n");
    scanf("%d", &user_input);
    for(row = 1; row <= user_input; row++)
    {
        for (column = 1; column <= user_input * 2; column++)
        if (column <= user_input + x && column >= user_input - x)
            printf("*");
        else
            printf(" ");
            printf("\n");
            x++;

Name: Anonymous 2010-03-07 1:28

printf("Height\n");
    scanf("%d", &use
    for(row = 1; row
    {
        for (column
        if (column <
            printf("
        else
            printf("
            printf("
            x++;


That should do it.

Name: Anonymous 2010-03-07 1:49

hmm it looks the same to me

Name: Anonymous 2010-03-07 1:55

>>1
assemble(move(order(Slaves,CarveMoreStoneBlocks()),pyramidConstructionSite))

Name: Anonymous 2010-03-07 2:37

Nope, still can't get it to work.

Name: Anonymous 2010-03-07 3:14

>>2
YOU HELPED HIM!!

Name: ‮suomynonA 2010-03-07 3:57



Name: Anonymous 2010-12-26 21:26

Name: Anonymous 2011-02-03 7:22


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