Computing.Net > Forums > Programming > summation in C

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

summation in C

Reply to Message Icon

Name: Ricky (by galaxianape)
Date: October 2, 2008 at 22:25:34 Pacific
OS: XP
CPU/Ram: 256
Product: ddr2
Comment:

Please help me with summation in C lang.

I m trying to divide the summation of alpha * delta with summation of alpha
this is half the program that i have written...but it gives error. pls help..

This is my program, it says invalid indirection in function main ]

i haved use stdio.h and math.h

main ()
{
float del1, del2,deli,delj,deln, alpha;
int j,vi,i;
int sum=0;

printf ("provide alpha");
scanf .......

for (j=1;j<=vi;j++)
sum += alpha [i][j] *deln [j];

}

Please help me with summation in C lang.

I m trying to divide the summation of alpha * delta with summation of alpha
this is half the program that i have written...but it gives error. pls help..



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: October 2, 2008 at 22:52:02 Pacific
Reply:

sum += alpha [i][j] *deln [j];

How do you expect the compiler to treat alpha and deln as arrays if you haven't declared them as such?


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: summation in C

Pointers in C/C++ www.computing.net/answers/programming/pointers-in-cc/876.html

what does this func do in C www.computing.net/answers/programming/what-does-this-func-do-in-c/9528.html

Null Character in C? (NOT '\0') www.computing.net/answers/programming/null-character-in-c-not-0/3201.html