how to find midpoint position with "char left_paren, comma, right_paren" in C++?

#include <iostream>

using namespace std ;

int main() {

   double x1, y1, x2, y2, x3, y3;

    char left_paren, comma, right_paren;

    cout << "enter the first points positions: \n";

    cin >> left_paren >> x1 >> comma >> y1 >> right_paren;

    cout << "enter the second points positions: \n";

    cin>> left_paren >> x2 >> comma >> y2 >> right_paren;

    x3 = (x1 + x2)/2;

    y3 = (y1 + y2)/2;

    cout << "the middle point position is: " << x3 << "," << y3;

    return 0;

}


this program is supposed to give me the position of the midpoint but it seems like there is an error somewhere cause the program doesn't behave how it's supposed to. if someone can help me resolve the issue, I'd really appreciate that
how to find midpoint position with "char left_paren, comma, right_paren" in C&#43;&#43;?
 
 
Q