Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

C# konzolni kalkulator pomoc

[es] :: .NET :: C# konzolni kalkulator pomoc

[ Pregleda: 2605 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

bl00dzer0

Član broj: 292304
Poruke: 5
*.dynamic.isp.telekom.rs.



+1 Profil

icon C# konzolni kalkulator pomoc27.11.2012. u 22:25 - pre 138 meseci
Code:

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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args);
        
            class Calculator
    {
        private Double _num1;
        private Double _num2;

        public Double PI
        {
            get
            {
                return Math.PI;
            }
        }

        public Calculator(Double num1, Double num2)
        {
            this._num1 = num1;
            this._num2 = num2;
        }

        public void WriteNumber1()
        {
            Console.WriteLine(this._num1);
        }

        public void WriteNumber2()
        {
            Console.WriteLine(this._num2);
        }

        public Double Add()
        {
            return this._num1 + this._num2;
        }

        public Double Subtract()
        {
            return this._num1 - this._num2;
        }

        public Double Multiply()
        {
            return this._num1 * this._num2;
        }

        public Double Divide()
        {
            return this._num1 / this._num2;
        }

        public static Double Add(Double num1,Double num2)
        {
            return num1 + num2;
        }

        public static Double Subtract(Double num1, Double num2)
        {
            return num1 - num2;
        }

        public static Double Multiply(Double num1, Double num2)
        {
            return num1 * num2;
        }

        public static Double Divide(Double num1, Double num2)
        {
            return num1 / num2;
        }

        public static Double PovrsinaKruga(Double poluprecnik)
        {
            return Math.PI * 2 * poluprecnik;
        }
    }
        }
    }


da li bi neko mogao da mi pomogne oko resenja i gde gresim u ovom kodu, treba mi za skolu. uporno mi izbacuje gresku pri kompajliranju :S
 
Odgovor na temu

Shadowed
Vojvodina

Član broj: 649
Poruke: 12851



+4784 Profil

icon Re: C# konzolni kalkulator pomoc27.11.2012. u 23:02 - pre 138 meseci
Fali ti telo funkcije main.
 
Odgovor na temu

bl00dzer0

Član broj: 292304
Poruke: 5
*.dynamic.isp.telekom.rs.



+1 Profil

icon Re: C# konzolni kalkulator pomoc27.11.2012. u 23:06 - pre 138 meseci
hvala, sad znam sta treba, evo upravo pisem i to je to :)
 
Odgovor na temu

[es] :: .NET :: C# konzolni kalkulator pomoc

[ Pregleda: 2605 | Odgovora: 2 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.