Mata me program eka karaganna 'C' language eka danna kenek udaw karanwada... Please need you guys help badly...
Define 10 cities (colombo,kandy,jaffna,matara,Galle, etc) program should assign the code names
The cities & their co-ordinate are hard coded
Eg: colombo (2 9) Galle (5 6)
Generate the 2 co-ordinate points (0,0, to 10,10) (user should input 2 co-ordinate)
In 15 tries
If your point is not in map you ignore ,but you loose a try.
Calculate the total distance you travel in 15 tries
Total distance= d1+d2+..
sqrt((x1-x2)^2)+(y1-y2)^2))
If
Total distance >= 150km -->you won
50 <=Total distance < 150km -->Okey
0 <= Total distance < 50 -->bad try
Please help me to get this done.... U can get the values any way u like
Ex: 5,6 or 5 6 for single cordinate
Define 10 cities (colombo,kandy,jaffna,matara,Galle, etc) program should assign the code names
The cities & their co-ordinate are hard coded
Eg: colombo (2 9) Galle (5 6)
Generate the 2 co-ordinate points (0,0, to 10,10) (user should input 2 co-ordinate)
In 15 tries
If your point is not in map you ignore ,but you loose a try.
Calculate the total distance you travel in 15 tries
Total distance= d1+d2+..
sqrt((x1-x2)^2)+(y1-y2)^2))
If
Total distance >= 150km -->you won
50 <=Total distance < 150km -->Okey
0 <= Total distance < 50 -->bad try
Please help me to get this done.... U can get the values any way u like
Ex: 5,6 or 5 6 for single cordinate
