Click here to Skip to main content
15,917,575 members
Home / Discussions / C#
   

C#

 
AnswerRe: unicode Pin
Christian Graus25-Oct-05 17:35
protectorChristian Graus25-Oct-05 17:35 
AnswerRe: unicode Pin
Rob Graham25-Oct-05 17:40
Rob Graham25-Oct-05 17:40 
AnswerRe: unicode Pin
Anonymous25-Oct-05 17:41
Anonymous25-Oct-05 17:41 
AnswerRe: unicode Pin
Gulfraz Khan27-Oct-05 5:31
Gulfraz Khan27-Oct-05 5:31 
AnswerRe: unicode Pin
lmoelleb27-Oct-05 11:16
lmoelleb27-Oct-05 11:16 
Questionwriting a C#program(arrays) Pin
Zjaded25-Oct-05 13:19
Zjaded25-Oct-05 13:19 
AnswerRe: writing a C#program(arrays) Pin
Christian Graus25-Oct-05 13:25
protectorChristian Graus25-Oct-05 13:25 
AnswerRe: writing a C#program(arrays) Pin
Guffa25-Oct-05 13:25
Guffa25-Oct-05 13:25 
GeneralRe: writing a C#program(arrays) Pin
Zjaded25-Oct-05 13:37
Zjaded25-Oct-05 13:37 
GeneralRe: writing a C#program(arrays) Pin
David Stone25-Oct-05 13:59
sitebuilderDavid Stone25-Oct-05 13:59 
GeneralOT Pin
leppie25-Oct-05 22:30
leppie25-Oct-05 22:30 
GeneralRe: OT Pin
David Stone26-Oct-05 11:11
sitebuilderDavid Stone26-Oct-05 11:11 
GeneralRe: writing a C#program(arrays) Pin
Zjaded26-Oct-05 10:18
Zjaded26-Oct-05 10:18 
here's my code so far:

[STAThread]
static void Main(string[] args)
{
double [] testvals = new double [14];
testvals [0] = 89;
testvals [1] = 95;
testvals [2] = 72;
testvals [3] = 83;
testvals [4] = 99;
testvals [5] = 54;
testvals [6] = 86;
testvals [7] = 75;
testvals [8] = 92;
testvals [9] = 73;
testvals [10] = 79;
testvals [11] = 75;
testvals [12] = 82;
testvals [13] = 73;

}
static double [] calc_avg (double []testvals)
{
double [] avgerage = new double [14];
for(int i = 0; i<14; i++)
{
average[i] = testvals[i]/14;
}
return average;
}
static double [] variance (double [] calc_avg, double []testvals)
{
double []variance = new double [14];
for (int i = 0; i<14; i++)
{
variance[i] = (average[i] - testvals[i])^2


Now, i'm stuck with writing the part where you have to : The variance is obtained by subtracting the average from EACH VALUE in testvals, SQUARING THE VALUES OBTAINED, ADDING them, DIVIDING by the number of elements in testvals. The values returned from calc_avg() and variance() should be DISPLAYED IN THE MAIN..........the bolded words are where i'm getting stuck, do i do this all in one line, or multiple, or what does the coding look like???
GeneralRe: writing a C#program(arrays) Pin
Wjousts26-Oct-05 13:00
Wjousts26-Oct-05 13:00 
GeneralRe: writing a C#program(arrays) Pin
Christian Graus25-Oct-05 14:00
protectorChristian Graus25-Oct-05 14:00 
QuestionQuestion about draw method (basic question) Pin
Green Fuze25-Oct-05 13:14
Green Fuze25-Oct-05 13:14 
AnswerRe: Question about draw method (basic question) Pin
Christian Graus25-Oct-05 13:25
protectorChristian Graus25-Oct-05 13:25 
GeneralRe: Question about draw method (basic question) Pin
Green Fuze25-Oct-05 13:55
Green Fuze25-Oct-05 13:55 
GeneralRe: Question about draw method (basic question) Pin
Green Fuze25-Oct-05 14:08
Green Fuze25-Oct-05 14:08 
GeneralRe: Question about draw method (basic question) Pin
Christian Graus25-Oct-05 14:11
protectorChristian Graus25-Oct-05 14:11 
GeneralRe: Question about draw method (basic question) Pin
Green Fuze25-Oct-05 14:34
Green Fuze25-Oct-05 14:34 
GeneralRe: Question about draw method (basic question) Pin
Christian Graus25-Oct-05 14:45
protectorChristian Graus25-Oct-05 14:45 
GeneralRe: Question about draw method (basic question) Pin
Green Fuze25-Oct-05 14:48
Green Fuze25-Oct-05 14:48 
GeneralRe: Question about draw method (basic question) Pin
Christian Graus25-Oct-05 14:53
protectorChristian Graus25-Oct-05 14:53 
AnswerRe: Question about draw method (basic question) Pin
Mark Hahn CA25-Oct-05 20:04
Mark Hahn CA25-Oct-05 20:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.