C++ Saved Program: placid-home

facebook share

Here's the online compiler accompanied with IDE at your service. This is a saved code by one of our users. Try it out or save your own from the IDE page and don't forget to leave a feedback. You can find that at the bottom of the page.


#include<stdio.h>
int main ()
{
    int x1,y1,x2,y2,x3,y3

 printf("Unesite kordinatu x1");
 scanf("%d",& x1);
 printf("Unesite kordinatu y1");
 scanf("%d",& y1);
 printf("Unesite kordinatu x2");
 scanf("%d",& x2);
 printf("Unesite kordinatu y2");
 scanf("%d",& y2);
 printf("Unesite kordinatu x3");
 scanf("%d",& x3);
 printf("Unesite kordinatu y3");
 scanf("%d",& y3);

if((x1<x2 && x2<x3) && (y1<y2 && y1<y3))
{
    printf("Najbliza je prva tacka");
}
else if ((x2<x1 && x2<x3) && (y2<y1 && y3<y1))
{
    printf ("Najbliza je druga tacka");
}
 return 0;
}
Execute

Output

Press the execute button or CTRL + enter to run code.

Inputs