#include <iostream.h> #include <conio.h> using namespace std; int main() { double x1,y1,a, b,x2, y2; cout<<"masukkan x1 = "; cin >> x1; cout<<"masukkan x2 ="; cin >> x2; cout<<"masukkan y1="; cin >> y1; cout<<"masukkan y2="; cin >> y2; a =(x1+x2)/2; b =(y1+y2)/2; cout << "nilai dari garis x ="<<a << endl; cout << "nilai dari garis y = "<<b << endl; getch(); }
No comments:
Post a Comment