Created
July 14, 2022 06:01
-
-
Save bharathmuddada/208e404f29dc608abc085bae78294c6b to your computer and use it in GitHub Desktop.
Print a star right angle triangle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RightAngleTriangle | |
{ | |
public static void Main(String[] args) | |
{ | |
Console.WriteLine("Right angle triangle : "); | |
int n = 5; | |
for (int i = 1; i <= 5; i++) | |
{ | |
for (int j = 1; j <= i; j++) | |
{ | |
Console.Write("*"); | |
} | |
Console.WriteLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment