|
-
Dec 15th, 2007, 02:13 PM
#1
Thread Starter
New Member
A layman need your help @^@
Hi, Pros. I am a rookie on programming and really need some help to solve a few problem. Thank you in advance.
1)
int k;
class Point
{ public int x;
public int y;
}
Point [] coord = new Point[9];
k=0;
for (int i=1;i<=3;i++)
{ for (int j=1;j<=3;j++)
{ coord [k]=new Point();
coord [k].x=i;
coord [k].y=j;
k++
}
MessageBox.Show("Value is[" + coord[4].x +"," +coord[4].y+"]")
Which is right shown in the message box?
a. Value is [1,3]
b. Value is [2,2]
c. Value is [3,1]
d. Value is [1,1]
e.None of the above
2)
double x, z;
x=5.10;
z=f(x);
and f(x) is a given function that returns a double.
How to test to determine whether z==1.0,
a. Math.Abs(z-1.0)<=o.0000001;
b. z==1.0;
c. both
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|