#include <iostream.h>
#include <conio.h>
void main ( )
{
int i , j , sum ;
int elements[3][7] = { {0,2,4,6,8,10,12},
{14,16,18,20,22,24,26},
{28,30,32,34,36,38,40} } ;
for ( i = 0,sum = 0 ; i < 3 ; i++)
{
for (j=0 ; j<7 ; j++)
sum = sum + elements[i][j] ;
}
cout <<"\n The result of addition = "<< sum ;
getch ( ) ;
}
0 comments:
Post a Comment