Untitled
unknown
plain_text
10 months ago
350 B
4
Indexable
#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;
}Editor is loading...
Leave a Comment