dosseva

EX2_TriangleSides

Apr 17th, 2021
536
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. class GFG
  4. {
  5.     public static int checkValidity(int a, int b, int c)
  6.     {
  7.         if (a + b <= c || a + c <= b ||b + c <= a)
  8.         {
  9.             return 0;
  10.         }
  11.         else
  12.         {
  13.             return 1;
  14.         {
  15.     }
  16.  
  17.     public static void Main()
  18.     {
  19.         int a = 7, b = 10, c = 5;
  20.      
  21.         if ((checkValidity(a, b, c)) == 1)
  22.         {
  23.           Console.Write("Valid");
  24.         }
  25.         else
  26.         {
  27.           Console.Write("Invalid");
  28.         }
  29.     }
  30. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×