Thursday, October 25, 2007

:::|Sweet Jokes™ |::: Bug Fix ..............Very Good

Hey,

        see the bug in the code..
 
 
How to remove this bug from my code????

 
 
#include
< stdio.h>
#define LAST 10

int main()
{
int i, sum = 0;


for ( i = 1; i < = LAST; i++ )
{
     sum += i;
}

/*-for-*/
printf("sum = %d\n", sum);
return 0;
}

 
 
And the developer fixes it this way

 
.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

 
#include stdio.h;
#define LAST 10

int main()
{
int i, sum = 0;

 
   // Fixed. Doesn't move anymore.

for ( i = 1; i < = LAST; i++ )
{
     sum += i;
}

/*-for-*/
printf("sum = %d\n", sum);
return 0;
}
 

:-)
 
Regards,
 
Ashish
__._,_.___

Group Email Addresses
Post message: sweet_jokes@yahoogroups.com
Subscribe:    sweet_jokes-subscribe@yahoogroups.com
List owner:   sweet_jokes-owner@yahoogroups.com
Moderator:    ANURAG BHATIA (anurag.bhatia@gmail.com)
              Linda Miller   (LMcloverberry1@aol.com)




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

No comments: