穆扬, here is a link for you: http://www.cplusplus.com/ref/iostream/cin.html
I think you need a good book in c++. IO in c++ is much comfortabler than IO in c. For example you don't need such d%, s%, just simple connect cin, cout IO object with the variable.