## Multiply a row of numbers

Multiply a row of numbers
# 1
01-20-2014
Multiply a row of numbers

the following is used to add numbers:
how do i multiply OR subtract a row of numbers using the above tactic?
 SkySmart View Public Profile for SkySmart Find all posts by SkySmart
# 2
01-20-2014
Try:

or
This User Gave Thanks to Chubler_XL For This Post:
 Chubler_XL View Public Profile for Chubler_XL Find all posts by Chubler_XL
# 3
01-21-2014
Quote:
Originally Posted by Chubler_XL
Try:

or
both worked perfectly.

i tried modifying it on my own to also substract numbers and i cant seem to get that work:
also tried this:

 SkySmart View Public Profile for SkySmart Find all posts by SkySmart
# 4
01-21-2014
-2550 is the exact solution, so what be your problem?
 RudiC View Public Profile for RudiC Find all posts by RudiC
# 5
01-21-2014
the correct amount should be 849
 SkySmart View Public Profile for SkySmart Find all posts by SkySmart
# 6
01-21-2014
Quote:
Originally Posted by SkySmart
the correct amount should be 849
Here is 849

This User Gave Thanks to Akshay Hegde For This Post:
 Akshay Hegde View Public Profile for Akshay Hegde Find all posts by Akshay Hegde
# 7
01-21-2014
Quote:
Originally Posted by SkySmart
the correct amount should be 849
This is not what you programmed. Your equation is 1 - 1700 - 36 - 3 - 2 - 788 - 22 = -2550
You need to take special action - as Akshay Hegde did - to use one of the elements as minuend.
 RudiC View Public Profile for RudiC Find all posts by RudiC

## Sum of numbers in row

Need help in coding: File with several rows incl. numbers like 1 2 3 4 5 6 7 8 ... How can i build the sum of each row seperately? 10 26 ... Thx for help. Please use CODE tags as required by forum rules!

## Multiply value by row

Hi I would like to know how can I multiply the value of column three to columns 4-end of file example of input file: rs1000012 AK8 2 0.05 0.05 1 0 0 rs10000154 PAQR3 0.01 2 1 2 2 1 Desired output file: rs1000012 AK8 ...

## Print last row of numbers

I have a spreadsheet of extremely long rows of numbers. I want to print only the last column. Tried using printf but there seems to be too many rows. example: 3 100 34 7 23 0 8 ..... X 400 203 778 1 ..........Y 58 3 9 0 100 ..........Z I only want to print X, Y and...

## [Solved] Add row of numbers

Hi, Trying to add a row of numbers. There are 24 number across. Would like to have column 25 sum each row. 10 3 45 49 0 24... Sum 3 200 3 9 1 3 ...... Sum 9 7 20 9 8 10 ...... Sum Thank you.

## extracting non-zero pairs of numbers from each row

Hi all, I do have a tab delimited file a1 a2 b1 b2 c1 c2 d1 d2 e1 e2 f1 f2 0 0 123 546 0 0 0 0 0 0 0 0 0 0 345 456 765 890 902 1003 0 0 0 0 534 768 0 0 0 0 0 0 0 0 0 0 0 0 0 0 456 765 0 0 0 0 0 0 0 0 0 0 0 0 12 102 0 0 0 0 456 578 789 1003 678 765 345 400 801 1003 134 765...

## 6. Shell Programming and Scripting

is there another way of doing the below: echo "7 3 8 2 2 1 3 83.4 8.2 4 8 73 90.5" | bc shell is bash. os is linux and sunos. bc seems to have an issue with long range of numbers

## Multiply numbers in two columns and then add.

I have some 100 files with extension .tmp The files are named as 1.tmp, 2.tmp, 3.tmp until 100.tmp All files look like this: 0.38701788 1.968068e-02 0.38622013 2.054002e-02 0.38350296 1.715522e-02 0.38282126 1.781283e-02 0.38282126 1.781283e-02 0.35847232 1.026839e-02 0.3557739...

## Multiply numbers from different files

Hi All, I have tried few things with this but it did not help much. I have some 200,000 files in a directory. There are two sets of files. 1. Files with extension .dat with file names like these (1.dat, 2.dat, 5.dat, 8.dat....200000.dat) 2. Another set of files with .txt extension and...

## counting the numbers in a row

File A aa <space> --D--A--D---DDY---M--UM-M--MY Another file D3 M9 So output shud be Here in FileA D which is 3 after removing dash after we have counted dash D is position at 9 and for M is 23 final output will be D9 M23

## How to add/multiply numbers with scientific notation (2.343e-5)

Hi, I'm need to do some addition and multiplication of scientific nottaion numbers, in the form 34.23423e-10 for example. I was echoing the list of numbers to stdout, then using bc -l, then I find that this does not seem to work for numbers with exponential notation. Could someone help me out...