I need help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

I need help

Why my code wrong? fun main(args: Array<String>) { var years = readLine()!!.toInt() } var num1=15 var num2=365 var num3=5 println(num1*num2*num3)

4th Mar 2021, 11:08 AM
Doaa Ahmed Abdelwahab
2 Answers
+ 1
What code?
4th Mar 2021, 11:23 AM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Your code is outside of the main() function just floating around. Put it inside the main() function before the closing curly brace } You do need to change num3 for years though. println(years*num1*num2) Ipang It's the 1st module project for the Kotlin course.
4th Mar 2021, 12:32 PM
ChaoticDawg
ChaoticDawg - avatar