arrow_forward همه ارسال‌ها

جزئیات ارسال کد#888

verified
وضعیت داوری نهایی: پذیرفته شد
terminal
زبان برنامه‌نویسی: C++
schedule
ارسال‌کننده و زمان:
Parsa Alizadeh (۱۰ ماه پیش)
descriptionsolution.cpp ۳۴ خط • ۳۷۹ بایت
1#include<bits/stdc++.h>
2using namespace std;
3
4int main()
5{
6 string s;
7 cin>>s;
8 int i=1;
9 string reshte="";
10 while(true)
11 {
12 if(i==s.length()-1)
13 {
14 cout<<reshte;
15 break;
16 }
17 if(s[i]==',')
18 {
19 cout<<reshte<<"\n";
20 reshte="";
21 }
22 else if(s[i]=='"')
23 {
24 i++;
25 continue;
26 }
27 else
28 {
29 reshte+=s[i];
30 }
31 i++;
32 }
33 return 0;
34}
کد ارسال‌شده برای داوری خودکار هاتکدز UTF-8