C++ Sekuen dua Titik

#include <iostream>
#include <string>

using namespace std;
int main()
{
string raptor_prompt_variable_zzyz;
int x2;
int y2;
int a;
int b;
int c;
int x1;
int y1;

cout<<” Menghitung Jarak Dua Titik Sebuah Benda”;
cout<<endl;
raptor_prompt_variable_zzyz =”Masukkan x1″;
cout << raptor_prompt_variable_zzyz << endl;
cin >> x1;
raptor_prompt_variable_zzyz =”Masukkan y1″;
cout << raptor_prompt_variable_zzyz << endl;
cin >> y1;
raptor_prompt_variable_zzyz =”Masukkan x2″;
cout << raptor_prompt_variable_zzyz << endl;
cin >> x2;
raptor_prompt_variable_zzyz =”Masukkan y2″;
cout << raptor_prompt_variable_zzyz << endl;
cin >> y2;
a =(x2-x1)*(x2-x1);
b =(y2-y1)*(y2-y1);
c =(sqrt*(a+b));
cout << “Titik A= “<<a << endl; cout << “Titik B= “<<b << endl; cout << “Jarak Titik A Ke Titik B= “<<c << endl;

system(“pause”);
return 0;
}

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s