Esempio n. 1
0
 static void Step8770()
 {
     Console.WriteLine();
     Console.WriteLine("8770");
     int[]    in8770  = { 30, 37, 40, 8, 100 };
     String[] out8770 =
     {
         "30+\n31-\n32-\n33-\n34-\n35-\n36-\n37-\n38-\n39-\n40-\n",
         "30-\n31-\n32-\n33-\n34-\n35-\n36-\n37+\n38-\n39-\n40-\n",
         "30-\n31-\n32-\n33-\n34-\n35-\n36-\n37-\n38-\n39-\n40+\n",
         "30-\n31-\n32-\n33-\n34-\n35-\n36-\n37-\n38-\n39-\n40-\n",
         "30-\n31-\n32-\n33-\n34-\n35-\n36-\n37-\n38-\n39-\n40-\n"
     };
     for (int i = 0; i < in8770.Length; i++)
     {
         var result = Lab06.task8770(new StringBuilder(), in8770[i]);
         if (out8770[i].Equals(result.ToString()))
         {
             Console.WriteLine("Задача решена верно");
         }
         else
         {
             result.Insert(0, "Неверно. Результат:\n");
             Console.WriteLine(result.ToString());
         }
     }
 }