Thanks,that was the problem.

Qt Code:
  1. cout<<"Enter a";
  2. cin>>a;
  3.  
  4. cout<<"Enter b";
  5. cin>>b;
  6.  
  7. int result = a * b;
To copy to clipboard, switch view to plain text mode 

worked.