スレを勃てるまでもないC/C++の質問はここで 8
at TECH
253:デフォルトの名無しさん
09/03/09 12:31:54
>>249 メモ帳べた書きでコンパイルしてない。好きにしろ。
#include <stdio.h>
#include <conio.h>
int main(){
const char* password = "1994"; int count = 0;
do{
int i; char input_password[4];
printf("パスワードを入力して下さい。(4文字): \n>");
for(i = 0; i < 4; ++i){input_password[i] = getch(); putchar('*');}
}while(!strcmp(password, input_password) && count++ < 3);
if(count >= 3){
puts("仏の顔も三度まで!\n正式なpasswordがないとシステムは使用できません!");
}else{
printf("password = %s\nシステムの使用を許可します。\n", password);
}
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5380日前に更新/124 KB
担当:undef