Proper variable names!

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 8505 Views - Last Post: 26 February 2013 - 02:20 PM Rate Topic: -----

#16 Syngenetic  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 41
  • Joined: 28-June 12

Re: Proper variable names!

Posted 29 June 2012 - 02:00 PM

Rofl.. imagine doing that on a test or for a company. Someone who is going to go back and read the source code will flip out. Thanks for the good laugh.
Was This Post Helpful? 0
  • +
  • -

#17 Syngenetic  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 41
  • Joined: 28-June 12

Re: Proper variable names!

Posted 29 June 2012 - 02:00 PM

Rofl.. imagine doing that on a test or for a company. Someone who is going to go back and read the source code will flip out. Thanks for the good laugh.
Was This Post Helpful? 0
  • +
  • -

#18 extremeblueness  Icon User is offline

  • D.I.C Head

Reputation: 16
  • View blog
  • Posts: 186
  • Joined: 22-October 12

Re: Proper variable names!

Posted 23 October 2012 - 07:56 PM

lol. I come to this area for laughs. This thread is no exception!
Was This Post Helpful? 0
  • +
  • -

#19 k3y  Icon User is offline

  • D.I.C Head

Reputation: 36
  • View blog
  • Posts: 205
  • Joined: 25-February 12

Re: Proper variable names!

Posted 26 February 2013 - 02:20 PM

View Postandrei31, on 16 February 2012 - 04:07 PM, said:

This is a function for printing a heap stored like a vector. I
forgot his exact idea. This code was sent to a course signup :)/>/>.

I find it hard to read, thanks to those very suggestive vars. Do you? :dontgetit:/>/>

void my_print(int a[], int x,int t) {
    int i,s,l,j,k,b;
    s=2;l=0;
    for(i=1;i<t;i++) {s=s*2 +4;
            l=l*2+3;}
    for(j=1;j<=s;j++) printf("*");
    printf("\n");
    
    k=1;b=1;
    for(i=1;i<=x;i++) {   
                if (b==1) { b=0;
                for(j=1;j<=l;j++) printf(" ");}
                printf("%4d",a[i]);
                if (i!=1)
                    for(j=1;j<=s;j++) printf(" ");
                if((i+1)==(pow(2,k))) {printf("\n");b=1;s=(s-4)/2;l=(l-3)/2;k++;}


               }   
printf("\n");


}


Posted Image
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2