why does my program print off the wrong answers?
ok my program is relitivly simple at the moment but i cant get it to print out what class and id that you select will some one show me what i did wrong??
Code:
#include <stdio.h>
main ()
{
char *class_name[03]={"hunter","ranger","force"};
char *statnum [06]={"SYNC","IQ ","DEF ","POW ","DEX ","MIND"};
char *section_id[10]={"viridia","greenil","skyly","bluefull" ,"purplenum",
"pinkal" ,"redria" ,"oran" ,"yellowboze","whitill"};
int *ID;
int *class;
int blah;
int qwe;
int comm[4][9];
int stat[7][2]; /* initialize STATS */
for (qwe=0;qwe<7;qwe++)
{
for (blah=0;blah<2;blah++)
{
stat [qwe][blah] =0;
}
}
stat [0][0] =40; /* initialize SYNC */
stat [2][0] =5; /* initialize DEF */
printf ("Enter section ID \n");
for (qwe=0;qwe<10;qwe++)
{
printf ("%i : %s\n",qwe,section_id[qwe]);
}
scanf ("%i",&ID);
blah=ID;
printf ("Enter character class \n");
for (qwe=1;qwe<4;qwe++)
{
printf ("%i : %s\n",qwe,class_name[qwe-1]);
}
scanf ("%i",&class);
printf ("your section id is\n %s \n",section_id[*ID]);
printf ("your class is \n%s \n",class_name[*class-1]);
for (qwe=0;qwe<6;qwe++) printf ("%s is %i . %i \n",statnum[qwe],stat[qwe][0],stat[qwe][1]);
}
thanx
~kl3pt0~