Google "How C Programming works" and go the 39th chapter. And don't use System("pause").
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)
create a shortcut to the exe and put it behind the path?
it works but only if it is executed with dev C++
why is this happening
If you run it by just double clicking you're again not passing in any arguments thus it will find argc == 1
you have to pass the arguments to it by either
a) Passing them through your Dev environment
b) Do what HD said and make a shortcut and add them there
c) Run the program from the Dos-Prompt (which you should learn since
most of these apps you're writing are really made to be ran like that anyway).