[ create a new paste ] login | about

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

C++, pasted on Oct 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	int i,x[4],y[4],dst[4],mxdst,fnldst;//declarasions
	system("cls");
	for(i=0;i<4;i++){//I/O stuff
		couti+1<<" X-Coords: ";
		cin>>x[i];
		cout<<"Y-Coords: ";
		cin>>y[i];
		system("cls");
	}
        mxdst=0;
	for(i=0;i<4;i++){
		dst[i]=sqrt(pow(0-x[i],2)+pow(0-y[i],2));//Maths stuff
                if(mxdst<dst[i])mxdst=dst[i];
	}
	fnldst=mxdst/100;//also some maths stuff
	fnldst=fnldst+100;
        cout<<fnldst;
	getch();
	return 0;


Create a new paste based on this one


Comments: