KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
here is my code: object theater extends App { val m = readInt val n = readInt val a = readInt val c1 = m/a + (if(m%a == 0) 0 else 1) val c2 = n/a + (if(n%a == 0) 0 else 1) print(c1 + c2) } But the input format is: 3 integers in the same line. But for 3 integers in one line scala will consider that as a string. How can I read that string and get the 3 values in the 3 separated variables?
Tags (comma-separated)
Save Edits
Cancel