Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void mains()
- {
- int arr[7][7];
- arr[0][0] = 1;
- int i , j;
- for(i=0 ; i<7 ; i++)
- {
- for(j=0 ; j<7 ; j++ )
- {
- if(i<j)
- {
- arr[i][j] = i*j;
- }
- else if (i>j)
- {
- arr[i][j] = 0;
- }
- else if(i=j)
- {
- arr[i][j] = 1;
- }
- }
- }
- for (int k = 0 ; k<7 ; k++)
- {
- for (int c = 0 ; c < 7 ; c++)
- {
- cout << arr[k][c] << "\t";
- }
- cout << "\n";
- }
- }
- int main()
- {
- mains();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement