R-Eingabe und Ausgabe von '%' Zeichen - \\\\\

R - Eingabe und Ausgabe von '%' Zeichen
Beschreibung
Eingabe mit drei %Teilungen positiver Ganzzahlen abc ist der Monat, Tag, Jahr,

Es ist erforderlich, wie es ist, gemäß dem Eingabestil auszugeben.

Geben Sie eine
positive Ganzzahl im Bereich von drei int mit der Zwischenteilung %ein.

Die Ausgabe
erfolgt wie im Titel beschrieben.

Beispiel
Eingabe
9% 17% 2018
Ausgabe
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;
}

Ich denke du magst

Origin blog.csdn.net/KO812605128/article/details/112340813
Empfohlen
Rangfolge