Untitled
#include <iostream> using namespace std; int main() { int tab[3][3] = {{0, 1, 2}, {3, 4, 5}, {6 ,7 ,8}}; int s_p = 0; for(int i = 0; i < 3; i++){ for(int j = 0; i < 3; j++){ if(i > j){ s_p += tab[i][j]; } } } cout <<s_p<<endl; system("PAUSE"); return EXIT_SUCCESS; }
Leave a Comment