Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //room area
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Project_2
- {
- struct Room
- {
- float length;
- float width;
- public Room(float length, float width)
- {
- this.length = length;
- this.width = width;
- }
- public void area()
- {
- Console.WriteLine("Area = {0}", this.length * this.width);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Room room = new Room(104.5f, 83f);
- room.area();
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement