I ran it and it worked.
What are you passing to the command line? If you're running it from within Visual Studio, then you'll have to set the arguments in the project properties.
Right click on the project->Properties,
Then go to "Debug" and you'll see an entry for 'Command Line Arguments"
Where then you'd type : 3 5.4
or whatever numbers you want to pass in
Or you could simply open a dos prompt in the folder where you have your EXE and run it from there (which also negates the need for any of this pause/getch stuff)