dahlea 0 Report post Posted September 16, 2007 (edited) assalamualaikum....can anybody in here help me solving my dunno-wut-todo prob....act im still new in this c kind of thing..tak expert langsung...n yet i hav to submit my assignment in 1 weeks from now(i guess).all the codes dah ade.but byk error n i dunno how to fix it ..ye la kan...im just like setahun jagung in dealing with this thingy.so,i hope sumbody can gimme a hand n correcting my codes this is the question...write a program that accepts a list f about 100 scores and process the scores as follows:a. find the highest,lowest and average of scoresb. find the mode,standard deviation and median of the scoresc. Display the histogram for the distribution of scoresthis is how i put all the codes together yang sah2 mmg salah for highest:int highest;int temp;int SIZE[100];int temp SIZE[0];/* 0 is the first number in the listint i;for (i=0;i<+100;++i){if (temp>SIZE[i+1])temp=SIZE[i+1];}highest=temp;for lowest:int lowest;int SIZE[100];int temp;int temp SIZE[0];int i;for (i=0;i<=100;++i){if (temp<SIZE[i+1])temp=SIZE[i+1];}lowest=temp;for average;float average;int total=0;for (0;;i++){total=total+SIZE;}average=total/100;}for mode:int rating;int j;int h;int largest=0;int modevalue=0;for (rating=1;rating<=9;rating++){freq[rating]=0;}for (j=0;j<SIZE;j++){++freq[answer[j]];}for(rating=1;rating<=9;rating++){printf ("%8d %11d",rating,freq[rating]);}if (freq[rating>largest){largest=freq[rating];modevalue=rating;}im not sure bout standard deviation n median but this is the formula for standard deviation:sqrt(sum_sqrt/highest_score-average*average;for histogram:int answer,rating;int frequency={0};int responses=FILE*thefile;for (answer=0;answer<SIZE;answer++){++frequency[responses[answer]];}printf (%s%17s\n","Rating","Frequency");for (rating=1;rating<SIZE;rating++){printf ("%6d%17d\n",rating,frequency[rating]);}thats all yang termampu saye buat.hope sangat anybody boleh tolong saye.hidup n mati pnye case ni...an if possible,response asap la ek..cuz dateline is just around the corner..since bulan ramadahn ni,tlg la sedekahkan ilmu kat saye yang tak seberape nak ade ilmu ni ek..hehe..THANKS ALOT!!!ur concern is really appreciated. Edited September 16, 2007 by dahlea Quote Share this post Link to post Share on other sites
JavaMojo 0 Report post Posted September 24, 2007 Uiks !! Ini macam soalan asignment ni !! Report lecturer karang !!Dah ada solution ka? Quote Share this post Link to post Share on other sites