- 문 받
- 를 . C 는 런들 .
- scanf()
- getchar()
- gets
- getch()
-
#include<stdio.h>
int main()
{
char *asdf = " =";
// 변 ?
// 뭐 ? 봅.
puts(" 를 . .");
// 3는 무 ?
scanf("%f",&ZiLm); // 보 변를 . 문.
//scanf("%lf",&ZiLm);
//scanf("%d",&ZiLm);
// ?
NulbI = (/*는 보.*/)*3.14;
// 문 ?
printf("%s%f",asdf,NulbI);
printf("%s%lf",asdf,NulbI);
printf("%s%d",asdf,NulbI);
return 0;
}
대
#include<stdio.h>
int main()
{
char q='q';
puts(" 문를 물 볼!");
do {
int num1 = rand()%10000; //rand()는 를 돌는 .
int num2 = rand()%10000;
int sub = num1-num2;
int ans;
printf("%d-%i는 ? : ",num1,num2);
scanf("%d",&ans);
//getchar();
if(/* ?*/)
{
puts("맞!");
}
else
{
puts("");
}
puts("램 면 q 면 른 :");
q=getchar();
} while (q!='q');
puts("램 !");
return 0;
}
ㅇㅈㅎ
#include<stdio.h>
#include<stdlib.h>
#include<Windows.h>
#define TURN_GAP 500
int main()
{
int myHP = 10000;
int GwaJaeHP = 10000;
int GwaJaeDem;
char key;
puts(" C 났!!!!");
while(TRUE)
{
puts("---------------------------------");
puts("무 ?");
puts("a:몸!! s:르!!");
key=getchar();
// '' 례
switch (key) {
case 'a':
puts("()는 몸!!를 .");Sleep(TURN_GAP);
GwaJaeHP -= 100;
printf("는 100 를 !\n");Sleep(TURN_GAP);
break;
case 's':
puts("()는 르!!를 .");Sleep(TURN_GAP);
puts("러 무 .");Sleep(TURN_GAP);
break;
default:
continue;
}
// 례
switch (rand()%2) {
case 0:
puts(" !");Sleep(TURN_GAP);
GwaJaeDem = rand()%100 + 100;
myHP -= GwaJaeDem;
printf("()는 %d mental 를 !\n",GwaJaeDem);Sleep(TURN_GAP);
break;
case 1:
puts(" 뿐.");Sleep(TURN_GAP);
puts("무 .");Sleep(TURN_GAP);
puts("런데 .");Sleep(TURN_GAP);
break;
default:
break;
}
Sleep(2000);
fflush(stdout);
fflush(stdin);
system("cls");
if(myHP<0)
{
puts(" 무 !");Sleep(TURN_GAP);
break;
}
if(GwaJaeHP <0)
{
puts("를 !");Sleep(TURN_GAP);
}
}
return 0;
}