-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd523ef
commit 43f6d62
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
A | ||
/* | ||
// 编译系统真喵的坑 | ||
#include <cstdio> | ||
#include <algorithm> | ||
#include <iostream> | ||
#include <string> | ||
#include <cstring> | ||
using namespace std ; | ||
|
||
class tim | ||
{ | ||
private: | ||
int y , m , d ; | ||
string s ; | ||
public: | ||
void set() | ||
{ | ||
cin >> y >> m >> d >> s ; | ||
} | ||
bool check() | ||
{ | ||
for(unsigned int i = 0 ; i < s.length() ; i ++) | ||
if(s[i] == '.') return false ; | ||
return true ; | ||
} | ||
void out() | ||
{ | ||
if(check()) | ||
cout << y << "-" << m << "-" << d << endl ; | ||
else | ||
cout << y << "年" << m << "月" << d << "日" <<endl ; | ||
} | ||
}; | ||
|
||
int main() | ||
{ | ||
tim t ; | ||
t.set() ; | ||
t.out() ; | ||
return 0 ; | ||
} | ||
*/ |