Ok so I been following this book "How to teach Yourself C"
and its pretty old but its working and helping me learn but now im stuck on loops
I use Cygwin to compile CodeBlocks to Write
Code:
#include <stdio.h>
main()
{
char smplChr, again;
again = 'A';
while(again == 'A')
{
printf("What char do you need the ASCII value of? > ");
scanf("\n%c",smplChr);
printf("\n The ASCII VALUE OF %c is %d\n ",smplChr,smplChr);
printf("\n\nEnter "A" To Look up Another Value " );
printf("\nOr anyother letter if your Finsihed. ");
scanf("\n%c",&again);
}
}
Error from Compiler:
Code:
MrNerd@MrNerd-PC ~/HelloWorld/anscii$ gcc main.c -o main
main.c: In function main:
main.c:9:8: warning: missing terminating " character
main.c:9:2: error: missing terminating " character
main.c:10:3: error: expected expression before { token
main.c:19:1: error: expected expression before } token