c++17(8)-if,switch

#include 
#include 
using namespace std;
int main(int argc, char **argv)
{
    int x;
    cout<<"input:";
    if (cin>>x;x>5){
        cout<<">5"<<endl;
    }
    switch(cin>>x;x%3){
        case 1:
        cout<<"rem=1";
        break;
        case 2:
        cout<<"rem=2";
        break;      
        case 0:
        cout<<"rem=0";
        break;           
    }
    return 0;
}
if (     ;  )
switch (     ;  )

좋은 웹페이지 즐겨찾기