Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Procedure
- fun main() {
- hello()
- interest(1_000_000.0, 5.0, 7.0)
- }
- // Procedure
- fun hello() {
- println("Hai Universe...")
- }
- // Function (PARAMETER)
- fun interest(money: Double, percent: Double, months: Double) {
- val result = money * (percent / 100) * (months / 12)
- val results = result.toInt()
- println("Money: $money Percent: $percent Month: $months Interest: $results Decimal: $result")
- }
- /* 1. Function without parameter (Procedure), example: main()
- * 2. Function with parameter, example: interest(parameter). interest() is constructor
- * 3. Function with return (method)
- * Pray 4 Uyghur: https://bylinetimes.com/2020/08/24/death-is-everywhere-millions-more-uyghurs-missing/
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement