Write a program in C# that asks the user for a string and displays a right-aligned triangle.
public class DrawRightAlignedTriangle
public static void Main(string args)
string text = Console.ReadLine();
int j = 1;
for (int i = text.Length - 1; i >= 0; i--)
Practice C# anywhere with the free app for Android devices.
Learn C# at your own pace, the exercises are ordered by difficulty.
Own and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.