gets(),puts()函数
使用gets(),puts()函数实现字符串的输入和输出
代码实现
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| `\#include "stdio.h"`
`\#include <string.h>`
`**int** main()`
`{ **char** you[]={"12345"};`
`**char** password[100]={};`
`gets(password);`
`**if** (strcmp(password,you)==0) {`
`printf("Welcome!");`
`}`
`**else**{`
`printf("You are not right");`
`}`
`}
|