Reverse

Reverse

Try recreating a program based on a series of inputs and outputs.

Examples

4
4
8
12
16
20
24
28
32
36
40

3.5
3.5
7
10.5
14
17.5
21
24.5
28
31.5
35

Hint

It's a multiplication table.

Answer

#include <iostream>

int main() {
	float input;
	std::cin >> input;

	std::cout << input << "\n";
	std::cout << input * 2 << "\n";
	std::cout << input * 3 << "\n";
	std::cout << input * 4 << "\n";
	std::cout << input * 5 << "\n";
	std::cout << input * 6 << "\n";
	std::cout << input * 7 << "\n";
	std::cout << input * 8 << "\n";
	std::cout << input * 9 << "\n";
	std::cout << input * 10 <<;
}
Questions