#include <iostream>
#include <string>
void printDiagonalText(const std::string& text) {
for (size_t i = 0; i < text.size(); ++i) {
std::cout << std::string(i, ' ') << text[i] << "\n";
}
}
int main() {
std::string text = "Hello World";
printDiagonalText(text);
}
/*
run:
H
e
l
l
o
W
o
r
l
d
*/