QUESTIONS & SOLUTIONS
random number generator - ANSWERRandom myGen=
new Random();
Random number generator from 50-100 - ANSWERmyGen.Next(50,101);
converting text box text (X) to a string - ANSWERtxtbox.text= X.ToString();
Sum of variables (x, x1, x2, x3) - ANSWERdouble sum= x+x1+x2+x3;
mean of 4 variables - ANSWERdouble= (sum/4);
Variance formula - ANSWERstandard deviation squared
SD formula - ANSWERfind mean, (point-mean)^2, add up all the point values, divide by
the number of points, take the square root.
concatenation of strings - ANSWER"Hello" + txtName.Text + "!";
short data type - ANSWERholds small integers, non decimals
int data type - ANSWERholds medium sized integers, non decimals
long data type - ANSWERholds big sized integers, non decimals
float data type - ANSWERsmall decimal, least space
double data type - ANSWERmedium sized decimals
decimal data type - ANSWERhuge sized decimals
string - ANSWERany number of alphabetic, numerical and special characters
bool - ANSWERa true or false
date - ANSWERdates, what day is it today? January 1st
how to declare "my number" as a double? - ANSWERdouble my number;
declarations, colors - ANSWERColor.Red
Color.Black
ect