Mapper
chkflg.c
Go to the documentation of this file.
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4 
5 int isQualBetter(char ch1, char ch2)
6 {
7 
8 char *qualstr = {"MFREWDCBALZQSVNH"};
9 char a1, a2;
10 int power1, power2, i;
11 
12  power1 = -1; power2 = -2;
13 
14  for(i=0;i<16;i++)
15  {
16  if(qualstr[i] == ch1) power1 = i;
17  if(qualstr[i] == ch2) power2 = i;
18  }
19 
20  if(power1 < 0) return power1;
21  if(power2 < 0) return power2;
22  if(power1 > power2)
23  return 1;
24  else
25  return -3;
26 }
static int i
int isQualBetter(char ch1, char ch2)
Definition: chkflg.c:5