Make sure your including the right things. #include <iostream> or really old version #include <iostream.h> to use cout, cin and endl. #include <stdio.h> to use printf.
How to use printf: printf("text %variable",number);
If you want to add more variables, keep adding at the back: printf("text %variable1 %variable2",number1, number2);