[ create a new paste ] login | about

Link: http://codepad.org/a4xcohQQ    [ raw code | fork ]

C++, pasted on Oct 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
int main(int argc, char *argv[]){
        int i,x[4],y[4],dst[4],mxdst,fnldst;
        mxdst=0;//Resets a variable because of a 
	//just some I/O, the user enters the whole array of x[] and y[]
        
	for(i=0;i<4;i++){
		dst[i]=sqrt(pow(0-x[i],2)+pow(0-y[i],2));//Formel für den Abstand
                if(mxdst<dst[i]){
                      mxdst=dst[i];
                }
	}
	fnldst=mxdst/100;
	fnldst=fnldst+100;
}


Create a new paste based on this one


Comments: