- 1

Write an program to produce an n times multiplication table ( n less than or equal to 10). Help please!

1 2 3 4 1 1 2 3 4 2 2 4 6 8 3 3 6 9 10 4 4 8 12 16

19th Mar 2018, 4:39 PM
John Rei Cabunas
John Rei Cabunas - avatar
4 Answers
0
in c language scanf("%d",&n) for(int i = 1; i<=10;i++){ print(i*n); } in python n = int(input ()) for i in range (1,11); print(i*n)
19th Mar 2018, 4:48 PM
Dinesh Banjara
Dinesh Banjara - avatar
0
Sir i need it in c++. using #include <iostream> as header
19th Mar 2018, 4:49 PM
John Rei Cabunas
John Rei Cabunas - avatar
0
no problem use cin instead scanf
19th Mar 2018, 4:52 PM
Dinesh Banjara
Dinesh Banjara - avatar
0
#include <iostream> using namespace std; int main() { int num; cin >> num; for(int i=0; i<=10; i++){ cout << i*num; cout << "\n"; } return 0; }
19th Mar 2018, 5:00 PM
Dinesh Banjara
Dinesh Banjara - avatar