petrushkagoogol Posted February 15, 2018 Report Posted February 15, 2018 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; Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.