C++ Programming Exercise with Solution: Get two numbers and show multiply

Exercise:
Get two numbers from user, multiply those numbers using function and print out until user input 0 0.

Example:
Put two numbers: 3 5
Result: 15
Put two numbers: 2 3
Result: 6
Put two numbers: 5 9 
Result: 45
Put two numbers: 0 0
You did it 3 times.

Let's try and compare solution with me.
Solution:

#include<iostream>
using namespace std;

int number =0;

void mul(int a, int b){
 cout<<"Result: "<<a*b<<endl;
}

int main(void){

 int a,b;
 while(1){
  cout<<"Put two numbers: ";
  cin>>a>>b;
  if(a==0&&b==0)
   break;
  mul(a,b);
  number++;
 }
 cout<<"You did it "<<number<<" times"<<endl;

 return 0;
}

Feel free to comment below. Have a good day. :)