Advertisement
Guest User

asdasd

a guest
Nov 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace InstrukcjeWarunkowe05
  8. {
  9.     class Program
  10.     {
  11.         static double Funkcja1(int a, int b, int c)
  12.         {
  13.             if (a<=0 || b<=0 || c<=0)
  14.             {
  15.                 return -1;
  16.             }
  17.            return (a+2.0*b-5.0*c) / (a * c);
  18.         }
  19.  
  20.         static void Main(string[] args)
  21.         {
  22.             Console.WriteLine(Funkcja1(1,2,5));
  23.             Console.ReadKey();
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement