【問題描述】
輸入3組座標,按指定格式輸出
【輸入形式】
(x1,y1),(x2,y2),(x3,y3)
【輸出形式】
[x1,y1]
[x2,y2]
[x3,y3]
【樣例輸入】
(1,1),(2,3),(4,5)
【樣例輸出】
[1,1]
[2,3]
[4,5]
【樣例說明】
所有輸入輸出的符號均爲半角英文字符
#include <iostream>
using namespace std;
int main(){
int x1,y1,x2,y2,x3,y3;
char a,b,c,d,e,f,g,h,i,j,k;
cin>>a>>x1>>b>>y1>>c>>d>>e>>x2>>f>>y2>>g>>h>>i>>x3>>j>>y3>>k;
cout<<"["<<x1<<","<<y1<<"]"<<endl;
cout<<"["<<x2<<","<<y2<<"]"<<endl;
cout<<"["<<x3<<","<<y3<<"]"<<endl;
return 0;
}