Function with Return Value (रिटर्न वैल्यू वाला फंक्शन)
ऐसा Function जो अपना कार्य पूरा करने के बाद return Keyword की सहायता से कोई Value वापस भेजता है, उसे Function with Return Value कहते हैं।
English Definition
A function that sends a value back to the place where it was called using the return keyword is called a function with a return value.
Syntax
Example
Output:
Sum: 30 Explanation
add(a, b) — दो Parameters वाला Function है।
add(10, 20) — Function को Call करता है।
return a + b — 30 वापस भेजता है।
result = add(10, 20) — Returned Value को result में Store करता है।
print() — Result Display करता है।