Advertisement
callumbinner22

Records #1

Dec 15th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.08 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication53
  8. {
  9.     class Program
  10.     {
  11.  
  12.         struct school
  13.         {
  14.             public int schoolId;
  15.             public string schoolname;
  16.             public string headTeacher;
  17.             public string phoneNumber;
  18.             public int numStudents;
  19.         }
  20.  
  21.  
  22.  
  23.  
  24.         static school[] schools = new school[20];
  25.         static void Main(string[] args)
  26.         {
  27.             school StCuthberts;
  28.             StCuthberts.schoolId = 0;
  29.             StCuthberts.schoolname = "St Cuthberts";
  30.             StCuthberts.headTeacher = "Mr Thomson";
  31.             StCuthberts.phoneNumber = "01234 567890";
  32.             StCuthberts.numStudents = 1000;
  33.  
  34.             school Accrington;
  35.             Accrington.schoolId = 1;
  36.             Accrington.schoolname = "Accrington School";
  37.             Accrington.headTeacher = "Mr Jones";
  38.             Accrington.phoneNumber = "01234 564782";
  39.             Accrington.numStudents = 1232;
  40.         }
  41.  
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement