Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct point{
- string names;
- int x; int y; int z;
- }
- void main(string[] args) {
- point a= point();point b= point();point c= point();
- a.names = "First"; a.x = 1; a.y = a.x + 12; a.z = 14;
- b.names = "Second"; b.x = (int)Math.sqrt(7); b.y = a.x * a.y; b.z = b.y + b.x;
- c.names = "Third"; c.x = 542; c.y = a.x; c.z = b.z * a.y + c.y / c.x;
- File file = File.new_for_path ("test.csv");
- FileOutputStream os = file.replace (null, false, FileCreateFlags.PRIVATE);
- os.write(@"$(a.names), $(a.x), $(a.y), $(a.z)".data);
- os.write(@"$(a.names), $(b.x), $(b.y), $(b.z)".data);
- os.write(@"$(a.names), $(c.x), $(c.y), $(c.z)".data);
- print ("Created.\n");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement