次は、Rubyで長方形のクラスを定義し、インスタンスを一つ作り出しているものです。C言語で同様のプログラムを作成しなさい。
class Rectangle
def initialize(x1,y1,x2,y2)
@x1 = x1
@y1 = y1
@x2 = x2
@y2 = y2
end
attr_accessor :x1,:y1,:x2,:y2
end

rect1 = Rectangle.new(10,10,20,20)
p rect1

printf("長方形の対角の座標は(%d %d)と(%d %d)です。\n",rect1.x1,rect1.y1,rect1.x2,rect1.y2")