A
A
Andrey2019-02-21 00:17:17
bash
Andrey, 2019-02-21 00:17:17

Why is it showing an extra line?

Can you please tell me why it displays an empty line at the end? Please, it's urgent.
She prevents me from passing the program :(
5c6dc3bc94186158960875.png

#!/bin/bash

read N
arr=($(cat))

for ((i=0; i < N; i++))
do
  echo ${arr[i]}
done

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question