I was wanting to output numbers in the format below

i-> 0 j-> -0

i-> 0 j-> -1

i-> 0 j-> -2

i-> 1 j-> -0

i-> 1 j-> -1

i-> 1 j-> -2

i-> 2 j-> -0

i-> 2 j-> -1

i-> 2 j-> -2

So i wrote this while loop :

but it outputsCode:# include <stdio.h> int main(void){ int i=0; int j=0; while(i<3){ while(j<3){ printf("\n i->%d j->%d",i,j); j++; } i++; } }

i-> 0 j-> -0

i-> 0 j-> -1

i-> 0 j-> -2

only.

Wonder if someone could tell me where I am going wrong.thanks alot.