You are viewing a single comment's thread. Return to all comments →
#!/bin/bash
read n;
sum=0;
for i in n ); do
read line;
sum=sum + echoi -d " " - (echo((i )) -d " ") ))
echo
i -d " "
((
i )) -d " "
done
echo $sum | sed -e 's/-//'`
Seems like cookies are disabled on this browser, please enable them to open this website
Diagonal Difference
You are viewing a single comment's thread. Return to all comments →
#!/bin/bash
read n;
sum=0;
for i in n ); do
read line;
sum=sum +
echo
i -d " "
- (echo
((
i )) -d " "
) ))done
echo $sum | sed -e 's/-//'`