Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Lab15{
- class Program{
- static void Main(string[] args){
- double x = double.Parse(Console.ReadLine());
- double y = double.Parse(Console.ReadLine());
- Console.WriteLine("{0}", f(x, y) * Math.Log(f(x, 1)));
- double temp1 = 0;
- f1(x, y, ref temp1);
- double temp2 = 0;
- f1(x, 1.0, ref temp2);
- Console.WriteLine("{0}", temp1 * Math.Log(temp2));
- f2(x, y, out temp1);
- f2(x, 1.0, out temp2);
- Console.WriteLine("{0}", temp1 * Math.Log(temp2));
- Console.ReadKey();
- }
- static double f(double x, double y){
- return x * x + y;
- }
- static void f1(double x, double y, ref double z1){
- z1 = x * x + y;
- }
- static void f2(double x, double y, out double z1){
- z1 = x * x + y;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement