Generation

generate functionSat, 15 Apr 2023

Realiza un programa que clasifique un triángulo tras recibir el tamaño de sus lados. Se debe clasificar como triángulo rectángulo, isósceles, equilátero o escaleno.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp4 { class Program { static void Main(string[] args) { Console.WriteLine("Escribe el lado a"); int a = int.Parse(Console.ReadLine()); Console.WriteLine("Escribe el lado b"); int b = int.Parse(Console.ReadLine()); Console.WriteLine("Escribe el lado c"); int c = int.Parse(Console.ReadLine()); if (a == b && b == c) { Console.WriteLine("Tu triangulo es equilatero"); } else if (a == b && b != c || a != b && b == c || a == c && b != c) { Console.WriteLine("Tu triangulo es isosceles"); } else if (a != b && b !=

Questions about programming?Chat with your personal AI assistant