C/C++の宿題を片付けます 87代目
at TECH
435:デフォルトの名無しさん
07/05/19 08:39:21
>>433
VC++6でしか確認してねーけど。こういうこと?
#include <stdio.h>
#include <string.h>
void main(void) {
int i=0, c=0;
char max;
while ( i<10 ) {
c = getchar();
if ( (c>='a' && c<='z') || (c>='A' && c<='Z') ) {
if ( strcmp( &max, &((char)c) )>0 ) max=c;
++i;
}
}
printf( "MAX: %c\n", max );
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4258日前に更新/299 KB
担当:undef