remove <iostream>
remove <cstdlib> ... replace with <stdlib.h>
remove "using namespace"
calling a function "print" is bad practice.
void print(int x)
should not also have a local redeclaration of "int x" choose either one or the other. what is this doing, anyhow? printing 1-10? why do you need a dedicated function to do that?
good lord this is a mess.
where does your main() routine even end? where do your function definitions begin? are your functions "printtable" and "print" the same functions?
clean up this mess of code and repost it using proper indentations and code tags, so we can see what the heck is going on.
this is unreadable.