i want to run a program into terminal as well as putting in the numbers like this

suppose u have a xyz.cpp file in home and want to run it in terminal
./xyz <num1> <num2>
eg

./xyy 3 5

and outputing 8

-------
all this in the terminal
is there a way of doing this

Yes, you can do it using Command Line Arguments

Syntax would be like:

your_executable <arg1> <arg2> ...

for eg: ls -l
here, ls is the program. "-l" is the argument to it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.