Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using R Programming Language Write a function called print_numbers that takes two parameters num1 and num2. If num1 is less than num2, the function executes
Using R Programming Language
Write a function called print_numbers that takes two parameters num1 and num2. If num1 is less than num2, the function executes a for loop printing the numbers from num1 to num2. (if num1=1, nums2=10, print 1, 2, 3 10). Else, the function executes a while loop that prints numbers from num2 to num1. Hint: In while loop, set condition to num2 > num1, and minus 1 from num2 at the end of the while loop.
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