【问题描述】
输入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;
}