Wartość wyrażenia

Wartość wyrażenia

Program: obliczający wartość pewnego wyrażenia.

Zawartego w kodzie używając liczb podanych przez użytkownika.

Kompilator: Microsoft Visual Studio

Galeria:

Program w akcji.

Kod programu:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            double x, y, v, z;
            Console.WriteLine("Podaj wartosc pierwszej liczby:");
            x = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Podaj wartosc drugiej liczby:");
            y = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Podaj wartosc trzeciej liczby:");
            z = Convert.ToDouble(Console.ReadLine());
            v = (2 * x * y) / (3 * (z * z + 1));
            Console.WriteLine("Wartosc wyrazenia to: " + v);
            Console.ReadKey();
            Console.Clear();
        }
    }
}