Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
The problem i have would be printf("Average of %u values is %f.\n",n (n == 0) ? 0.0 : (double) sum / n); in the code on #3 because i have no idea what this means and apparently it is the problem for compiling. I have ask a few experience programmers and they say its another way to write a for statement is that true?
I am changing the codes for statement to while just for a heads up.
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Hawaii at Manoa, Honollulu (HI), Oahu(Hawaii), Tep Dobry, EE160 EE 160: Lab 10
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Moderator's Comments:
edit by bakunin: please use CODE-Tags when posting code, terminal output or something such. Thank you.
the program works now but the average show 0 every time i put an input. i think that it is my variable sum because the n variable went through other wise the math would be wrong. the sum kept seeing it as 0 and n sees it as how many variables there are going to be type in input. for example if i type 3 values, enter, type the values like 1 2 3 the average came to be zero
Hi, in my case, I have a question for topics that are slightly dealt with in class, which I am investigating on my own but which are not directly related to the lessons.
Do I have to put the name of the school and others?
(I can't put the name of the professor because is against the school rules... (2 Replies)
This is the coursework, in Technical University Sofia, Bulgaria prof. Koshmarov, sorry but the link to the course is broken. And this is the condition:
1. If the value of x is 5, and you have been set a new value as such
x="expr $x + 10", What would be the value of x?
What... (1 Reply)
Helping students is in line with the "community spirit" ethos of The UNIX and Linux Forums which aims to give free help and advice in order to support the personal and professional development of others.
We encourage students to think carefully about what they do, and do not, understand about... (0 Replies)
Homework Help:
On Posting Questions:
Any and all high school and undergraduate homework assignments or textbook style exercises for which you are seeking assistance are to be posted only in our Homework & Coursework Questions area--not in blogs, visitor messages, PMs, or the main technical... (0 Replies)