-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiplyTable.cpp
More file actions
48 lines (45 loc) · 853 Bytes
/
MultiplyTable.cpp
File metadata and controls
48 lines (45 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <iostream>
using namespace std;
int main()
{
int x,y,z=0,a=0,c=1,d=0;
cout << "Masukan batas tabel perkalian yang ingin ditampilkan= ";
cin >> x;
cout << "*" << " ";
for(y=1;y<=x;y++)
{
z=z+1;
cout << z << " ";
}
cout << " \n";
while(c<=x)
{
d=d+1;
int b=1;
if(d>9)
{
cout << d << " ";
}
else
{
cout << d << " ";
}
for(y=1;y<=x;y++)
{
a=d*b;
if(a>9)
{
cout << a << " ";
}
else
{
cout << a << " ";
}
b=b+1;
}
c=c+1;
cout << " \n";
}
system("pause");
return 0;
}