#include<iostream>
using namespace std;
int main() {
/**DEKLARASI**/
int x1,x2,y1,y2,y3;
float XT,YT;
/*ALGORITMA*/
cout<<"PROGRAM MENENTUKAN TITIK TENGAH"<<endl;
cout<<"x1="; cin>>x1;
cout<<"x2="; cin>>x2;
cout<<"y1="; cin>>y1;
cout<<"y2="; cin>>y2;
XT=(x1+x2)/2;
YT=(y1+y2)/2;
cout<<"Titik tengah (XT,YT)= "<<"("<<XT<<","<<YT<<")"<<endl;
system("PAUSE");
}
No comments:
Post a Comment