Skip to content

Commit

Permalink
Create charpter7(2).txt
Browse files Browse the repository at this point in the history
  • Loading branch information
tabVersion authored Dec 28, 2017
1 parent bd523ef commit 43f6d62
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions charpter7(2).txt
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 ;
}
*/

0 comments on commit 43f6d62

Please sign in to comment.