aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk3/lab3/multTable.cpp
blob: 8e2e887a3d9e91d55b074bb49ac02a840744f737 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <iostream>
using namespace std;
int main() {
  int r=1, c=1;
  for (r; r<=10; r++) {
    for (c=10; c>0; c--) {
      int ans = r*c;
      if (ans!=100) {
        cout << " ";
      }
      if (ans<10) {
        cout << " ";
      }
      cout << ans;
    }
  cout << endl;
  }
}