c# assignment I completed in c++