Mga Pahina

Huwebes, Enero 24, 2013

Nested Loop

#include<stdio.h>
#include<conio.h>
void main(){
clrscr();
int r,c,sum;
for(r=1;r<3;r++)
{
for(c=1;c<=2;c++)
{
sum=r+c;
printf("\n r=%d c=%d sum=%d",r,c,sum);
}
}
getch();
}

Walang komento:

Mag-post ng isang Komento