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.
18 Replies - 6501 Views - Last Post: 26 February 2013 - 02:20 PM
#17
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.
#18
Re: Proper variable names!
Posted 23 October 2012 - 07:56 PM
lol. I come to this area for laughs. This thread is no exception!
#19
Re: Proper variable names!
Posted 26 February 2013 - 02:20 PM
andrei31, 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?
/>/>
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?
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");
}
|
|

New Topic/Question
Reply





MultiQuote



|