C/C++の宿題をやらせて、お兄ちゃん 22代目
■ このスレッドは過去ログ倉庫に格納されています
0706デフォルトの名無しさん
NGNG#include <ctype.h>
int getch(void); void ungetch(int);
int main()
{
int c,pn;
c = getint(&pn);
printf("%c\n",'c');
return 0;
}
int getint(int *pn) {
int c, sign;
while (isspace(c = getch()))
;
if (!isdigit(c) && c != '0' && c != '+' && c!= '-'){
ungetch(c);
return 0;
}
■ このスレッドは過去ログ倉庫に格納されています