Untitled
unknown
plain_text
10 months ago
405 B
3
Indexable
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *arg[])
{
int tab[3][4] = {{0,1,2}
{3,4,5}
{6,7,8}};
int s_p= 0;
for(int i = 0 ; i < 3 ; i++){
for(int j = 0 ; j < 3 ; j++){
if(i > j){
s_p = s_p + tab[i][j];
}
}
}
cout<<s_p<<endl;
return 0;
}
Editor is loading...
Leave a Comment