skip to main | skip to sidebar

Rare-Scenes......

Friday, October 9, 2009

how to fix a BUG


#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;

/*


*/
for ( i = 1; i < = LAST; i++ ) { sum += i; } /*-for-*/ printf("sum = %d\n", sum); return 0; }

Posted by Krishantha at 9:08 AM

No comments:

Post a Comment

Newer Post Older Post Home
View mobile version
Subscribe to: Post Comments (Atom)
you want to sell or buy ?

Blog Archive

  • ►  2010 (7)
    • ►  May (4)
    • ►  April (2)
    • ►  January (1)
  • ▼  2009 (73)
    • ►  November (2)
    • ▼  October (3)
      • how to fix a BUG
      • Otuwooooo
      • toothpik world........ and him
    • ►  May (9)
    • ►  April (3)
    • ►  March (5)
    • ►  February (15)
    • ►  January (36)

Live Traffic Map