ini_PlayeR

2C_Cara Menghitung Luas Segitiga

Feb 24th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Menghitung_Luas_Segitiga
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Cara Menghitung Luas Segitiga\n");
  14.             double alas;
  15.             double tinggi;
  16.             double luas;
  17.             Console.Write("Alas             : ");
  18.             alas=Convert.ToInt32(Console.ReadLine());
  19.             Console.Write("Tinggi           : ");
  20.             tinggi=Convert.ToDouble(Console.ReadLine());
  21.             Console.Write("Luas Segitiga    : ");
  22.             luas=alas*tinggi/2;
  23.             Console.Write(luas);
  24.             Console.ReadKey();
  25.         }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment