News for hackers. Stuff that matters.
Re:Why does nobody seem to know what imperative and declarat... by rramadass on Saturday July 30, 2022 @01:39AM (#32284531)
Example Problem: Calculate the sum of the first N natural numbers.

Declarative: N(N+1)/2

Imperative: for(int sum=0, int i=1; i<=N; i++) {sum = sum+i;}

There are no comments on this comment yet.