コード例 #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     SequenceCalculator sc = new SequenceCalculator();
     int number = 0;
     pnlOutput.Visible = true;
     if (int.TryParse(txtNumber.Text, out number))
     {
         lblS311.Text = sc.S311(number);
         lblS312.Text = sc.S312(number);
         lblS313.Text = sc.S313(number);
         lblS314.Text = sc.S314(number);
         lblS315.Text = sc.S315(number);
     }
 }
コード例 #2
0
 public void TestS315()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual(sc.S315(16), "0,1,1,2,3,5,8,13");
 }
コード例 #3
0
 public void TestS314()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual(sc.S314(16), "1,2,C,4,E,C,7,8,C,E,11,C,13,14,Z,16");
 }
コード例 #4
0
 public void TestS313()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual(sc.S313(9), "2,4,6,8");
 }
コード例 #5
0
 public void TestS312()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual(sc.S312(9), "1,3,5,7,9");
 }
コード例 #6
0
 public void TestS311()
 {
     SequenceCalculator sc = new SequenceCalculator();
     Assert.AreEqual( sc.S311(6), "1,2,3,4,5,6");
 }