Please write a C++ program to (1) Generate the following pattern using.pdf
The document requests a C++ program that generates a specific pattern using a nested loop. Additionally, it instructs to save the generated pattern to a text file named 'triangle.txt'.