-8 )( B b = new B B A
A A . )( b.Test B .
:
A
B
-9 . )( B b = new C C B
C B . )( Test B
A new .
C . C.
-10 10 . ) a.a = Inc(a ) Inc(A a . a.a
++ .
= a.a
) Inc(a a (a.a) a 10 .
-11
struct Point
{
;public int x
;public int y
public int z = 0; //
//.
)(public Point
{
;x = 0
;y = 0
;z = 0
}
-12
)int[] Add(int[] a, int[] b
{
;int length, i
)if (a.Length > b.Length
;length = a.Length + 1
else
;length = b.Length + 1
return result;
-13
void PrintStrings(params object[] items)
{
for (int i = 0; i < items.Length; i++)
if (items[i] is string)
Console.WriteLine((string)items[i]);
}
-14
bool isCorrect;
int a;
do
{
try
{
isCorrect = true;
a = int.Parse(Console.ReadLine());
}
catch
{
isCorrect = false;
}
} while (!isCorrect);
-15
void PrintDirectories(DirectoryInfo dir)
{
ArrayList subDirs = new ArrayList();
subDirs.Add(dir);
while(subDirs.Count!=0)
{
dir = (DirectoryInfo)subDirs[0];
subDirs.RemoveAt(0);
foreach (DirectoryInfo sub in dir.GetDirectories())
{
Console.WriteLine(sub.FullName);
subDirs.Add(sub);
}
}