Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication23
- {
- class Rectangle
- {
- private int duljina;
- private int shirina;
- public Rectangle()
- {
- }
- public Rectangle(int a, int b)
- {
- this.duljina = a;
- this.shirina = b;
- }
- public int Duljina
- {
- get { return this.duljina; }
- set { this.duljina = value; }
- }
- public int Shirina
- {
- get { return this.shirina; }
- set { this.shirina = value;}
- }
- public int Calc()
- {
- int lice;
- return lice = duljina * shirina;
- }
- }
- }
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace ConsoleApplication23
- {
- class Program
- {
- static void Main(string[] args)
- {
- Rectangle rect = new Rectangle();
- rect.Duljina = int.Parse(Console.ReadLine());
- rect.Shirina = int.Parse(Console.ReadLine());
- Console.WriteLine("Liceto na pravougulnika e:" + rect.Calc());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement