Help for coding this programme


 
Thread Tools Search this Thread
Top Forums Programming Help for coding this programme
# 1  
Old 11-26-2009
Help for coding this programme

for a floating-point array x whose size is n, find the geometric mean..

GM =n x1.x2.x3...xn

Last edited by allyjaah; 11-26-2009 at 03:06 PM..
# 2  
Old 11-26-2009
Sounds like a school assignment.

The average of the logarithmic values of a data set, converted back to a base 10 number is how to generate a geometric mean.

1. for each element, generate the log - use the log() function. Keep a running total of the log values.
2. divide the running total by n
3. convert the resulting "average" log value base to a base 10 number - exp(avg log value) gives that.
# 3  
Old 11-26-2009
Homework? If so, please repost in the appropriate forum.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

programme is ok but not working in script

hi buddies; i have a very strange problem. i made a script composed of just 5 line. it is containing awk and nawk codes and it is working perfectly when it is applied one-by-one (copy & paste). but when i type run myscript.mos, it is giving: nawk: syntax error at source line 1 context is... (5 Replies)
Discussion started by: gc_sw
5 Replies

2. Programming

starting programme in C

hello, For school i make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an well example so i can make the mission thank you (1 Reply)
Discussion started by: wouter88
1 Replies

3. Programming

help with C programme to lock remote resources

hello every one i am working on a project to lock remote computer resources(hard drive, usb, cd- rom, folder etc). i have maintained connection using JAVA RMI and using JAVA JNI to lock resources, now i am really stuck up with C programme to do actual locking, i am using RHL-5 on admin computer... (7 Replies)
Discussion started by: zius_oram
7 Replies

4. Programming

cobol programme

I have some compile programme .crn now I want to run .crn programme on express cobol which allow only *.gnt programme any solution to run *.crn programme (0 Replies)
Discussion started by: bibi
0 Replies

5. Programming

How to call the C Programme in UNIX shell scripting...?

Hi All, How to call the C programme in UNIX shell scripting? please send me some sample script for the above scenario. Regards, MPS:b: (1 Reply)
Discussion started by: psiva_arul
1 Replies

6. Shell Programming and Scripting

snmpget in a perl programme

Hi Guyz can u tell me how to write a programme in perl using snmpget. Regards' Harrr (0 Replies)
Discussion started by: Harikrishna
0 Replies

7. Programming

Need help in a c programme

Dear Friends, I ve two text files like re_im.dat 13.7663000000 5.9572200000 10.2682000000 10.9345000000 5.0810700000 14.1132000000 two real values per row Sarf.dat 127 128 128 128 71 0 128 128 128 128 71 0 128 128 128 128 71 0 This is having 6... (2 Replies)
Discussion started by: user_prady
2 Replies

8. What is on Your Mind?

Certification Programme for Unix Shell Scripting

Hi All, Can any one know about "Certification Programme for Unix Shell Scripting"? How do I become Certified Unix shell scripting programmer? Where will I get this certification? How do I continue my career as a script programmer? What are the additional things to learn. Currently I know... (14 Replies)
Discussion started by: ganapati
14 Replies

9. Shell Programming and Scripting

want to use output of c programme in expect

hi i am having a c code which gives the output of my password in text format i.e when i run my c code which which gives the password asfollows====>>>>>> $./passwdprogram ======>>>>>>abc@123(this is the output) now i have an expect script to remotely ssh which uses the password set in ... (0 Replies)
Discussion started by: xander
0 Replies

10. UNIX for Dummies Questions & Answers

Unable to compile the c programme in unix

Hi, My name is vreddy and I am learning c language now and written one programme on vi editor. how do I compile the programme please give me some advice and that would be helpfull for me. thanks vre (10 Replies)
Discussion started by: vasudeva
10 Replies
Login or Register to Ask a Question