You would have fixed lot of bugs till today..
If so, there is a challenge for you.. Can you fix this one??
##########################################################
#include <stdio.h >
#define LAST 10
int main()
{
int i, sum = 0;
for (i=0; i<=LAST ; i++)
{
sum = sum + i;
}
printf("Sum = %d",sum);
}
##########################################################
I know its a tough one.. It could be fixed like this..
..
..
..
..
..
..
..
..
..
..
..
..
......
..
......
..
..
..
..
....
..
##########################################################
#include stdio.h;
#define LAST 10
int main()
{
int i, sum = 0;
/*
*/
for ( i = 1; i < = LAST; i++ )
{
sum += i;
}
printf("sum = %d\n", sum);
return 0;
}
##########################################################
-Madhav