Answers for "c++ center point"

C++
0

c++ center point

#include <iostream>
using namespace std;

int med(int k, int l){
    return (k+l)/2;
}

int main(){
    int p1,p2;
    cout << "Point 1 = " ;cin >> p1;
    cout << "Point 1 = " ;cin >> p2;
    cout << " Center point = " << med(p1,p2) << endl;
    
    return 0;
}
Posted by: Guest on October-08-2021

Browse Popular Code Answers by Language