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; } }