Viewing code of EX2_102C
// ------ ../cgi-bin/cout/EX2_102C.CPP --------------
//--- Programmed By Rajesh -----

/*
Progam typed by Rajesh
Kathmandu University
Exam paper 2002
q no 12).
part c).
Trace the output of the following program:



*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,x = 0;
clrscr();
for(i=0;i<5;++i)
{
for(j=0;j<i;++j)
{
x+=(i+j-1);
printf("\t i=%d j=%d x=",i,j);
printf("%d",x);
}
printf("\n");
}
printf("\nx= %d",x);
getch();
}