Jump to content
Science Forums

Computer Algorithm To Define Farming Strategy


petrushkagoogol

Recommended Posts

Is the discipline of Farming quantifiable and can it be represented pro grammatically ? 

 

I think so, and here is a very simple demo version that seeks to implement a very basic idea in farming strategy.

 

//Simple algorithm (computer program) to define Farming strategy (language : C#)

 

int nooftractors = 5;

 

int nooffields = 0;

 

int nooftractorsperfield = 2;

 

int noofnonutilizabletractors = nooftractors % nooftractorsperfield;

 

int noofavailabletractors = nooftractors - noofnonutilizabletractors;

 

while (noofavailabletractors > 0)

{

noofavailabletractors  -= nooftractorsperfield;

nooffields++;


 

Console.Writeline ("No of fields allowed for farming is : " + nooffields;

Console.Writeline ("No of tractors that can be leased out is : " + noofnonutilizabletracters;

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...