S
SithVegeta
Code:
#include <stdio.h>
int main(void)
{
int in;
printf("Please enter an ascii number to convert:\n");
scanf("%d \n", &in);
printf("You entered %d, the regular value is %c", in, in);
getchar();
getchar();
getchar();
getchar();
return 0;
}
This program is supposed to convert an ascii number value to its regular
equivalent. Example: entering 90 will give you a Z. Why then do I need to
type in 90 twice? Also, why do I need to have so many "getchar()"'s at the
end of the code to prevent the window from closing right away?
Thanks!
-=Allen=-
#include <stdio.h>
int main(void)
{
int in;
printf("Please enter an ascii number to convert:\n");
scanf("%d \n", &in);
printf("You entered %d, the regular value is %c", in, in);
getchar();
getchar();
getchar();
getchar();
return 0;
}
This program is supposed to convert an ascii number value to its regular
equivalent. Example: entering 90 will give you a Z. Why then do I need to
type in 90 twice? Also, why do I need to have so many "getchar()"'s at the
end of the code to prevent the window from closing right away?
Thanks!
-=Allen=-