First off, a few pointers (see comments)
using std::cin;
using std::endl; // #include changes to import, there are no namespaces
void multiplication(); // this isn't needed no matter where your functions (or methods, as they're called in Java) are placed
/* main changes to
public static void main(String[] args) {} // notice that return type is void
*/
int main()
{
multiplication();
return 0;
}
void multiplication()
{
int x;
int y;
int response = 0;
while ( response != -1 ) {
x = rand() % 10; // I'm not sure what you tried to do here
y = rand() % 10; // but these two would change
cout << " How much is " << x << " times " << y << " ( -1 to End ) ? : "; // cout changes to System.out.print(stuffToWrite) and << changes to a plus sign (+)
cin >> response; // cin is trickier, too much to explain
while ( response != -1 && response != x * y ) {
cout << " No. Please try again: " ;
cin >> response;
} //End While
if ( response != -1)
cout << "Very Good!\n\n";
} //End while
} // End function multiplication
I didn't know how new you were, so I just converted everything I know.
I would convert the whole program to Java but I can't see what you are doing with "rand() % 10", if you tell me what rand() does then I should be able to convert it for you, unless you think you have it down.