aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise02-bonus.cpp
blob: 6b553ad40921d65100f3b16d7563cb4e6d7529bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

int main() {
	int x;
	std::cin >> x;
	double step = 10.0 / x;
	double length = step;
	while (length <= 10) {
		for (int col = 0; col < length; col++) {
			std::cout << '#';
		}
		std::cout << std::endl;
		length += step;
	}
}