-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.c
76 lines (53 loc) · 1.84 KB
/
graph.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
int GRAPH(char take_town[],char global_string[])
{
int Place[8][8]={ {0,238,168,336,363,491,467,145},
{ 241,0,258,358,491,546,380,386},
{ 168,249,0,112,245,301,236,246},
{316,358,112,0,232,288,185,369},
{363,491,245,232,0,219,457,268},
{491,546,301,288,219,0,512,392},
{467,380,236,185,457,512,0,498},
{145,386,249,369,268,392,498,0}
};
int ta;
int g;
if(strcmpi(take_town,"Barisal")==0)
ta=0;
if(strcmpi(take_town,"Chittagong")==0)
ta=1;
if(strcmpi(take_town,"Dhaka")==0)
ta=2;
if(strcmpi(take_town,"Mymensingh")==0)
ta=3;
if(strcmpi(take_town,"Rajshahi")==0)
ta=4;
if(strcmpi(take_town,"Rangpur")==0)
ta=5;
if(strcmpi(take_town,"Sylhet")==0)
ta=6;
if(strcmpi(take_town,"Khulna")==0)
ta=7;
if(strcmpi(global_string,"Barisal")==0)
g=0;
if(strcmpi(global_string,"Chittagong")==0)
g=1;
if(strcmpi(global_string,"Dhaka")==0)
g=2;
if(strcmpi(global_string,"Mymensingh")==0)
g=3;
if(strcmpi(global_string,"Rajshahi")==0)
g=4;
if(strcmpi(global_string,"Rangpur")==0)
g=5;
if(strcmpi(global_string,"Sylhet")==0)
g=6;
if(strcmpi(global_string,"Khulna")==0)
g=7;
return Place[g][ta];
}