The template
topicsearch could not be loaded. HTTP Status code: 0
ASSIGNMENT PROGRAMMING
Assignment Programming
Assignment Programming
Exercise 10.3 WEEK 10 ARRAYS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class Class1
{
public class Seat
{
public string ID { get; set; }
public bool Occupied { get; set; }
}
int rows = 10, cols = 10;
Seat[,] seats = new Seat[rows,cols];
for (int i = 0; i < rows; ++i )
{
for (int j = 0; j < cols; ++j)
{
seats[i,j] = new Seat { ID = "Seat" + (i*cols + j), Occupied = false };
}
}
foreach (var seat in seats)
{
Console.WriteLine( "{0} is{1} occupied", seat.ID, seat.Occupied ? ...
Related Ads
- www.researchomatic.com...
Assignment , Assignment Essay writing h ...
- www.researchomatic.com...
Programming Assignment , Programming As ...
- www.researchomatic.com...
Participation in the Cooperative Education Progra ...
- www.researchomatic.com...
Assignment Assignment Research proposal outli ...
- www.researchomatic.com...
Individual Assignment , Individual Assignme ...
The template
footersearch could not be loaded. HTTP Status code: 0