-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.cs
32 lines (28 loc) · 792 Bytes
/
example.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
/// A struct for the example
struct AStruct
{
public int integer; //!< an integer
public char character; //!< a char
}
class Program
{
/// \param n a number, used as a size
/// \param list a list of structs
static void Example(int n, AStruct[] list)
{
/* TODO In a real life scenario, you will describe here what you want
the end user to do with this generated code */
}
static void Main()
{
int n = int.Parse(Console.ReadLine());
AStruct[] list = new AStruct[n];
for (int i = 0; i < n; ++i)
{
string[] words = Console.ReadLine().Split(' ');
list[i] = new AStruct {integer = int.Parse(words[0]), character = words[1][0]};
}
Example(n, list);
}
}