Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define _USE_MATH_DEFINES
- #include <string>
- #include <algorithm>
- #include <cmath>
- #include <iomanip>
- #include <fstream>
- #include <deque>
- #include <queue>
- #include <vector>
- #include <cstdlib>
- #include <set>
- #include <iostream>
- #include <cctype>
- using namespace std;
- size_t getCharSize(char* ptr) {
- return sizeof(ptr);
- }
- int main() {
- ifstream in("input.txt");
- ofstream out("output.txt");
- int d, m, y;
- char c;
- in >> d >> c >> m >> c >> y;
- char sd[1000],sm[1000],sy[1000];
- _itoa_s(d, sd, d + 1);
- _itoa_s(m, sm, d + 1);
- _itoa_s(y, sy, d + 1);
- if (d >= 8) {
- int i = 0;
- while(sd[i] != '\0'){
- if (islower(sd[i])) {
- sd[i] = toupper(sd[i]);
- }
- i++;
- }
- i = 0;
- while (sm[i] != '\0') {
- if (islower(sm[i])) {
- sm[i] = toupper(sm[i]);
- }
- i++;
- }
- i = 0;
- while (sy[i] != '\0') {
- if (islower(sy[i])) {
- sy[i] = toupper(sy[i]);
- }
- i++;
- }
- }
- out << sd << '/' << sm << '/' << sy;
- in.close();
- out.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement