Thursday, July 9, 2009

C language program?

how to produce those type of output in c language with the help of loop 1 6 7 9 12 35 plzzz tell me ....

C language program?
//As you asked





#include %26lt;stdio.h%26gt;





int main( void ) {


while(1) {


printf("1 6 7 9 12 35 plzzz tell me ....\n");


}


return 0;


}





//You really should do homework assignments yourself
Reply:What do you mean? Give more example that one provided.


I can see some pattern there, but I see two patterns...
Reply:hmm..hard part it to figure out how 1 6 7 9 12 35 are linked isnt it?! The pattern is not obvious like 2 4 6 8 etc (n+2, where n is previous number)
Reply:There are tons of C programming tutorials accessible via Google - did you even look?
Reply:#include %26lt;stdio.h%26gt;





int main()


{


int i;


int nnn [7] = { 1, 6, 7, 9, 12, 35, 0 };


for(i=0;nnn[i];i++)


{


printf("%d ",nnn[i]);


}


}


No comments:

Post a Comment