'commit'
This commit is contained in:
21
C++课程/第十课逻辑表达式和条件表达式/p75_2.cpp
Normal file
21
C++课程/第十课逻辑表达式和条件表达式/p75_2.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include<iostream>
|
||||
#include<cstdio>
|
||||
#include<ctype.h>
|
||||
using namespace std;
|
||||
|
||||
int main(void) {
|
||||
int n, key1, key2;
|
||||
cin >> n;
|
||||
|
||||
key1 = n % 123;
|
||||
key2 = n % 91;
|
||||
if(islower(key1))
|
||||
putchar(key1);
|
||||
else if(isupper(key2))
|
||||
putchar(key2);
|
||||
else
|
||||
putchar('*');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user