+ 1

can u guys give me some examples of how to use methods in programs

other than main

7th Feb 2017, 3:00 PM
shobhit
shobhit - avatar
2 Respostas
+ 6
For example math methods like sqrt, pow,etc. Also when you use objects you define in their class specific methods for that object, like if you have Worker you can have a method called CalculateSalary. Methods are really useful when you need to do a certain action many times to have a small code 😉
7th Feb 2017, 3:33 PM
C.E.
C.E. - avatar
0
can u give a tough example
7th Feb 2017, 3:31 PM
shobhit
shobhit - avatar