Find two vertices of an isosceles triangle in which there is rectangle with opposite corners ( 0 , 0 ) and ( X , Y ) | C ++ program to find two vertices of an isosceles triangle in which there is rectangle with opposite side ( 0 , 0 ) and ( x , y ) ; Function to find two vertices of an isosceles triangle in which there is rectangle with opposite side ( 0 , 0 ) and ( x , y ) ; Required value ; ; print x1 and y1 ; print x2 and y3 ; Driver code ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; int Vertices ( int x , int y ) { int val = abs ( x ) + abs ( y ) ; cout << val * ( x < 0 ? -1 : 1 ) << " ▁ 0 ▁ " ; cout << "0 ▁ " << val * ( y < 0 ? -1 : 1 ) ; } int main ( ) { int x = 3 , y = 3 ; Vertices ( x , y ) ; return 0 ; }