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

Code Style

Name: Anonymous 2010-01-24 16:09

The following program demonstrates your tab width, indentation style, and various other aspects of your code style. Please write it (in verbatim) in your preferred style. Remember to use spaces instead of tabs, as shitchan automatically converts tabs into 3 space characters.

[code]#include "stdio.h"

int main (void)
{   int   x;
    char  c = 'a';
    float y = 0;
   
    for (x = 0; x < 10; x++)
    {   if  (x % 2 == 0)
            printf ("%d\n", x);
        else
        {   printf ("%c\n", c);
            c +=1;
        }
    }
   
    return 0;
}

Name: Anonymous 2010-01-25 20:10

#include <stdio.h>

int main(void) {
  char c = 'a';
  float y = 0.0f;
  
  for (int x = 0; x != 10; ++x) {
    if (x % 2 == 0)
      printf("%d\n", x);
    else
      printf("%c\n", c++);
  }

  return 0;
}


The one true style. And no, I don't do C89 bullshit block declarations. It's 2010 for fuck's sake.

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