SHARE
TWEET

lecki 5.1

a guest Oct 10th, 2019 72 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 ConsoleApp2
  8. {
  9.     class Program
  10.     {
  11.         static void Func()  //дополнительный метод
  12.         {
  13.             Console.Write("x= ");
  14.             double x = double.Parse(Console.ReadLine());
  15.             double y = 1 / x;
  16.             Console.WriteLine("y({0})={1}", x, y);
  17.         }
  18.  
  19.         static void Main()  //точка входа в программу
  20.         {
  21.             int n = int.Parse(Console.ReadLine());
  22.             for (int i = 0; i < n; i++)
  23.             {     Func();
  24.                 Func();
  25.                 Func();
  26.             }
  27.         }
  28.  
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top