{"id":22984396,"url":"https://github.com/kalyan767z/triangle_output","last_synced_at":"2026-05-01T06:33:07.130Z","repository":{"id":265984374,"uuid":"897036376","full_name":"Kalyan767Z/Triangle_output","owner":"Kalyan767Z","description":"HomeWork 5: A program to dynamically draw ascending and descending triangles in C#. Focuses on nested loops and pattern generation.","archived":false,"fork":false,"pushed_at":"2024-12-02T13:38:16.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T04:44:28.306Z","etag":null,"topics":["beginner-friendly","beginner-friendly-frontend-project","csharp","csharp-code","csharp-programming","dotnet","dotnet-core","nested-loops","pattern-printing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kalyan767Z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-01T22:29:46.000Z","updated_at":"2024-12-02T13:39:52.000Z","dependencies_parsed_at":"2025-02-08T01:51:30.392Z","dependency_job_id":"a95b81e4-a300-4e37-831e-ccbc60b80817","html_url":"https://github.com/Kalyan767Z/Triangle_output","commit_stats":null,"previous_names":["kalyan767z/triangle_output"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Kalyan767Z/Triangle_output","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalyan767Z%2FTriangle_output","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalyan767Z%2FTriangle_output/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalyan767Z%2FTriangle_output/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalyan767Z%2FTriangle_output/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kalyan767Z","download_url":"https://codeload.github.com/Kalyan767Z/Triangle_output/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalyan767Z%2FTriangle_output/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beginner-friendly","beginner-friendly-frontend-project","csharp","csharp-code","csharp-programming","dotnet","dotnet-core","nested-loops","pattern-printing"],"created_at":"2024-12-15T03:16:09.669Z","updated_at":"2026-05-01T06:33:07.113Z","avatar_url":"https://github.com/Kalyan767Z.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Triangle Drawing Program\n\n## Instructions for Running the Program\n\n1. Open **Visual Studio** or any C# IDE of your choice.\n2. Copy and paste the code from the provided source file into the IDE.\n3. Compile and run the program.\n4. Follow the on-screen instructions to input the desired triangle size.\n\n## Tasks Performed by the Program\n\nThe program draws two types of triangles using the `#` symbol:\n1. **Ascending triangle**: Starts with one `#` and increases in size to the specified height.\n2. **Descending triangle**: Starts at the full height and decreases in size down to one `#`.\n\nThe program ensures only valid positive integer inputs are accepted and notifies the user in case of invalid input.\n\n## Description of the Program\n\nThis program prompts the user to input a positive integer value representing the size of the triangle. It then generates two visual patterns:\n\n1. An **ascending triangle**, which starts with a single `#` and grows in size line-by-line up to the specified height.\n2. A **descending triangle**, which starts at the full height with `#` symbols and reduces to a single `#`.\n\nIf the input is invalid or not greater than zero, an error message is displayed, and the program terminates.\n\n### Key Aspects\n\n- **Input validation**: Ensures that the size of the triangle is a positive integer.\n- **Dynamic pattern creation**: The triangles are drawn based on user input.\n- **Error handling**: Provides clear feedback for invalid inputs.\n\n\n### Step-by-Step Explanation:\n\n1. The user is prompted to input the triangle size.\n   - If the input is invalid or not greater than zero, the program displays an error message and terminates.\n2. If the input is valid:\n   - **Ascending triangle**:\n     - Uses nested `for` loops to dynamically generate the pattern by incrementing the number of `#` symbols in each subsequent line.\n   - **Descending triangle**:\n     - Uses nested `for` loops to dynamically generate the pattern by decrementing the number of `#` symbols in each subsequent line.\n\n### Program Structure:\n\n- **Input Handling**:\n  - The size is read using `Console.ReadLine()` and validated using `int.TryParse`.\n  - Checks that the input is greater than zero before proceeding.\n\n- **Pattern Drawing**:\n  - **Ascending triangle**: The outer loop iterates over the height, while the inner loop determines the number of `#` symbols in each line.\n  - **Descending triangle**: The outer loop iterates over the height, while the inner loop reduces the number of `#` symbols in each line.\n\n- **Error Handling**:\n  - Ensures the user enters valid positive integers. Displays an appropriate message for invalid inputs.\n\n## Program Logic Summary\n\nThis triangle drawing program effectively demonstrates fundamental programming concepts such as loops, input validation, and dynamic output generation. The patterns are simple yet versatile, making the program a great introduction to nested loops and user-defined outputs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalyan767z%2Ftriangle_output","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkalyan767z%2Ftriangle_output","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkalyan767z%2Ftriangle_output/lists"}