forked from Akatakata/zerda-exam-cpp-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path02.cpp
More file actions
31 lines (26 loc) · 608 Bytes
/
Copy path02.cpp
File metadata and controls
31 lines (26 loc) · 608 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
#include <iostream>
using namespace std;
void multiplication(int base) {
for (int i = 1; i <= 10; i++)
cout << i << " * " << base << " = " << i * base << endl;
}
int main() {
multiplication (5);
return 0;
}
/**
* Create a function that prints a multiplication table with a given base number
* It should take the base number as a parameter, and print the output to the cout
*
* The output should look like this for 5 as base:
* 1 * 5 = 5
* 2 * 5 = 10
* 3 * 5 = 15
* 4 * 5 = 20
* 5 * 5 = 25
* 6 * 5 = 30
* 7 * 5 = 35
* 8 * 5 = 40
* 9 * 5 = 45
* 10 * 5 = 50
*/