StringStream

  • + 0 comments

    int main() { string str; getline(cin,str);

    for(int i=0;i<str.length();i++)
    {
        if(str[i]==',')
        {
           cout<<"\n";
        }else
        {
            cout<<str[i];
        }
    

    } return 0; }

    //I hope this is helpful for beginners:)