C# program to find Perimeter of Scalene Triangle
Program
using System;
namespace PerimeterOfScaleneTriangle
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter the side 1 of an Scalene triangle:\t");
float sideOne = float.Parse(Console.ReadLine());
Console.Write("Enter the side 2 of an Scalene triangle:\t");
float sideTwo = float.Parse(Console.ReadLine());
Console.Write("Enter the side 3 of an Scalene triangle:\t");
float sideThree = float.Parse(Console.ReadLine());
float perimeter = (float) (sideOne + sideTwo + sideThree);
Console.WriteLine("Perimeter of Scalene Traingle is:\t" + perimeter);
}
}
}
Output
Enter the side 1 of an Scalene triangle: 25
Enter the side 2 of an Scalene triangle: 15
Enter the side 3 of an Scalene triangle: 12
Perimeter of Scalene Traingle is: 52