|The question is:
Do you seriously want to learn how to become an IT specialist, who can code, or are you more interested in the party type student life.
The problems you want resolved are quite trivial, and I could easily write you the required lines.
However, I will not! You seem to be early in your course. I have no doubt that your college provided you with the resources required where you can find out how to write this code. Read it, and Try it out, fail and Learn. Writing Code is about Trying and Learning, the whole time. You write the Code, Compile it. You get Compiling errors. That means that the Compiler does not understood what you wrote. Solve them, it Compiles. Now you have a running program or App. Does the App do what you want it to do! Very Often it does not. They call that Debugging!
I learned C and CPP/MFC the hard way. By myself, trial and error. My University simply did not have a computer that students could work with in 1974. My first computer was a Commodore 64 in 1985, where I learned the beginnings of Machine Code and ASM programming. A small PC with a C Compiler came as a godsend, and at the time I was in no doubt what compilers linkers, and debug/retail versions did and could do.
You have an institution with resources behind you. Use those resourses and learn. Stop asking this forum to resolve your exam questions.
Bram van Kampen