R-'%'文字の入力と出力-\\\\\

R-'%'文字の入力と出力正の整数の3つの除算を使用した
説明
入力%abcは月、日、年、

入力スタイルに合わせてそのまま出力する必要があります。


中間%除算を使用して、3intの範囲の正の整数を入力します。

出力は、
タイトルのように出力されます。

サンプル
入力
9%17%2018
出力
9%17%2018

#include <iostream>
#include <bits/stdc++.h>
using namespace std;

int main()
{
    
    
    int a, b, c;
    scanf("%d%%%d%%%d", &a, &b, &c);
    printf("%d%%%d%%%d\n", a, b, c);
    return 0;
}
#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main()
{
    
    
    int a, b, c;
    scanf("%d\\%d\\%d", &a, &b, &c);
    printf("%d\\%d\\%d\n", a, b, c);
    return 0;
}

おすすめ

転載: blog.csdn.net/KO812605128/article/details/112340813