Android,Articles,Anna University,Java,Software,and etc
/* Demonstration of nested loops */main( ){ int r, c, sum ; for ( r = 1 ; r <= 3 ; r++ ) /* outer loop */ { for ( c = 1 ; c <= 2 ; c++ ) /* inner loop */ { sum = r + c ; printf ( "r = %d c = %d sum = %d\n", r, c, sum ) ; } }}
No comments:
Post a Comment