Yamentou

Activity 2, Week 5 Assignment

Sep 2nd, 2020
1,093
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. namespace exercises
  3. {
  4.      class Program
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             Console.WriteLine(test(30, 0));
  9.             Console.WriteLine(test(25, 5));
  10.             Console.WriteLine(test(20, 30));
  11.             Console.WriteLine(test(20, 25));
  12.             Console.ReadLine();
  13.         }
  14.  
  15.       public static bool test(int x, int y)
  16.         {
  17.             return x == 30 || y == 30 || (x + y == 30);
  18.         }
  19.   }
  20. }
RAW Paste Data