Advertisement
Sergio_The_Best

1.3.6.3

Aug 22nd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 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 Task_1_3_6
  8. {
  9.     class Program
  10.     {
  11.  
  12.         static float SomeMul(float x, float y)
  13.         {
  14.             return x * y;
  15.         }
  16.  
  17.         static float SomeMul(float x, float y, float z)
  18.         {
  19.             return x * y * z;
  20.         }
  21.  
  22.  
  23.  
  24.         static void Main(string[] args)
  25.         {
  26.             /* Сделать перегрузку метода SomeMul для умножения параметров типа float.*/
  27.  
  28.             Console.WriteLine("Первая перегрузка равна {0}", SomeMul(10,3));
  29.             Console.WriteLine("Вторая перегрузка равна {0}", SomeMul(10,4,5));
  30.  
  31.             Console.ReadKey();
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement