February 13, 2011

Write a C Program using Nested for loop


/*write a Program using nested for loop*/
#include<stdio.h>
#include<conio.h>
void main()
{
 int r,c,sum;
 clrscr();
 for (r=1;r<=3;r++)
 {
 for (c=1;c<=2;c++)
 {
 sum=r+c;
 printf("\nr=%d, c=%d, sum=%d",r,c,sum);
 }
 }
 getch();
 }


Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :



Categories:

1 comments:

program to get a output

&
& &
& &
& & & & &

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails