Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHi, Are you new to C programs ?
Your printf will print hexadecimal value. because of "%x" try
noia = alt_getchar();
alt_printf("%c\n", noia);
But later in your code I see if (noia == 1) ! If you type with keyboard, alt_getchar may return between 40 and 124 (decimal values). So if you want you condition to be true you have to Press Alt with 0 then 0 then 1. If you want your condition to be true when you type '1' with keyboard, try if (noia == '1') noia should be declared as char (not "int"). Or this is an other problem.