Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.
(define (fact n) ;;method to solve a factorial
(if (= n 0)
1
(* n (fact (- n 1)))))
(define count 0) ;;keeps track of progress
(define total 0) ;;keeps running total
(define (e limit)
(if (< count limit)
total
(e (+ total (/ 1 (fact (+ count 1)))))
)
)
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
(define (fact n) ;;method to solve a factorial
(if (= n 0)
1
(* n (fact (- n 1)))))
(define (term x) ;;method to solve a single term
(/ 1 (fact x)))
(define count -1) ;;counter variable
(define total 0) ;;variable to hold ongoing total
(define (e limit)
(if (= count limit) ;;when the limit reaches count, it outputs total
total
(+ total (term limit) (e (- limit 1))) ;;adds to the total the current term and recursively calls the next number. Counts down to -1 (so that we include 0 in our calc)
)
)
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.