Computer Science, asked by aditisingh1550, 1 year ago

Why is there a need to create the function in a program?

Answers

Answered by Anonymous
0
a function is defined, it can be used over and over and over again.

Another aspect of reusability is that a single function can be used in several different (and separate) programs.

HOPE HELPS ✌️✌️
Answered by tejasgupta
1

Hi. Creating functions in programs reduces the need for duplication of code. For example, if you are creating a game, and you have three ways bu which the game can get over, so, if you create a function, you just write the function in the event or else, if you don't create a function, you will have to copy the code for each event. Hope it helps!

Similar questions