Other related lotto program in c programming language

Programming language C is not so far with C++ they are still related to each other, I am just confused why sometimes I don't understand some algorithm in C than C++. I am having a hard time coding lotto program, can you please give me some sample codes for C?
