can any body explain to me about the strange behaviour of this program
include<stdio.h>
include<conio.h>
void main()
{ long a,b,c;
clrscr();
printf("archimidianripplets");
for(a=1;a<=40;a++)
for(b=a;b<=40;b++)
for(c=b;c<=40;c++)
if(((aa)==(bb)+(cc))||((bb)==(aa)+(cc))||((cc)==(bb)+(aa)))
/mark/
printf(" \t%ld \t%ld \t%ld \n");
/mark do not give variables in printf*/
getch();
}
notice that there are no variables given in the printf statement yet it prints the required values correctly
(in the reverse order that is ;-) )
yet how can it happen?
I discovered this accidently
the tripplets were being displayed in reverse order . So i decided to change the order of the variables in the printf statement : But to my utter amazement i had not at all given the variables in the printf statement
compile it in Turbo C to get the effect
Enter your message below
Sign in or Join us (it's free).