how do I run this program?

coverturtle coverturtle at gmail.com
Wed Feb 25 05:02:04 MST 2015


It's a "c" program.  You must compile it, then run it with
the arguments you want.
open a terminal to do this, it's all command line stuff.
You may need to store the C code in a text file.
the suffix on the file must be ".c"
For more info, see
info make
info gcc
or us "man" instead of "info".
If you don't have those, you will need to get them.
I don't know which version of linux you are running
so the command to get them or the app to run
will depend on which distribution you have.
When you have the required compiler and utilities,
THEN:
You need to make sure you have gcc and make.
Try this:
make <program name>.c

To save the output, you will need to do what is
termed "redirect the output to a file".  It goes like
this:

<program name>  >save-file.txt

You can use whatever save file name you want
but it helps to use the .txt suffix.

Jon Kettenhofen
www.kexsof.com

On 02/25/2015 03:51 AM, Michael Havens wrote:
> I need to get every four digit combination as part of the next 
> challenge in bandit. I'm not a programmer so I googled for a solution. 
> Please, how do I run this program?
>
> int main(int argc, char** argv){
> int a,b,c,d;
>
> for(a=1; a<5; a++){
> for(b=1; b<5; b++){
> for(c=1; c<5; c++){
> for(d=1; d<5; d++){
> if(!(a==b || a==c || a==d || b==c || b==d || c==d))
> printf("%d%d%d%d
> ",a,b,c,d);
> }
> }
> }
> }
>
> return 0;
> }
> :-)~MIKE~(-:
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.phxlinux.org
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.phxlinux.org/mailman/listinfo/plug-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20150225/8a388177/attachment.html>


More information about the PLUG-discuss mailing list