C++ basic input and output When inputting a birthday, such as "1992 3 18", the program outputs the corresponding greeting message, such as "Hello 3 18 1992".

#include <iostream>

// load namespace std

using namespace std; 

int main()

{

    // Declare three variables to store year, month and day respectively

    int y, m, d;

    // Please add your code between Begin-End, enter your birthday, and output information in the specified format.   

    /********** Begin *********/

cin>>y>>m>>d;

cout<<"Hello!"<<" "<<m<<" "<<d<<" "<<y; 

    /********** End **********/

    return 0;

}

Guess you like

Origin blog.csdn.net/m0_61625235/article/details/121912367