Mark positions attacked by a queen on a chess board
Your solution is very procedural, and more like how a C program would be written.  I don't consider it to be idiomatic Scala.  You should decompose the problem into functions, such as isQueen and isAttacked in my solution below.

There should be very little code left over in main.  As a shortcut, then, you can just plop the main code directly into the ChessQueenAttack by making it extend App.

object ChessQueenAttack extends App {
  def isQueen(r: Int, c: Int): Boolean = { (r, c) == queenPos }

  def isAttacked(r: Int, c: Int): Boolean = {
    (r == queenPos._1) ||                       // Same row as queen
    (c == queenPos._2) ||                       // Same column as queen
    (r + c == queenPos._1 + queenPos._2) ||     // On / diagonal
    (r - c == queenPos._1 - queenPos._2)        // On \ diagonal
  }

  def board: String = {
    (0 until 8).map { r =&gt;
      (0 until 8).map { c =&gt;
        if (isQueen(r, c))    "Q" else
        if (isAttacked(r, c)) "X" else
                              "0"
      }.mkString(" ")
    }.mkString("\n")
  }

  val queenPos = (args(0).toInt, args(1).toInt)
  println(board)
}