Remove this bug from 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;
}
############ ######### ######### ######### ######### #########
{
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;
/*
#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;
for ( i = 1; i < = LAST; i++ )
{
sum += i;
}
/*-for-*/
printf("sum = %d\n", sum);
return 0;
2 comments:
nice program but how to write tht
ooo nooo balu whats that ... its just for fun ..
Post a Comment