Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a short program in this language that contains one function, and has at least one input, one variable and one conditional expression. Show the
Write a short program in this language that contains one function, and has at least one input, one variable and one conditional expression. Show the output of that program on two different inputs. Here is an example of the kind of program that I am looking for: -- Simple Program with one function function main a: integer returns integer; b: integer is a * 2; begin if a <= 0 then b + b; else b * b; endif; end; If this program is run with an input of 3, it returns 36. If it is run with an input of -3, it returns -12.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started