+ 1
What is a function for?
3 Answers
+ 2
It reduces the amount of typing so it'll help us to save time, also we can write it once and call it a thousand times which can result in better memory management.
- 1
it is made for keeping a program small and makes programing user friendly
suppose you have to use factorial of a number 10 times in a program
by functions you don't need to type whole code again and again just make a function and use it everytime you need it
- 2
see...for loop is a efficient option to while loop.well then ,what is a loop.?means continous performance of given iteration.in for loop,after veryfying test condition as true..we can actually go through the iteration.