Is Triangle or Not
For Complete YouTube Video: Click Here
In this class, we will understand Is Triangle or Not program.
The entire course of C Programming with more than 110+ videos of content or playlist has already been published.
We have covered all the concepts of C Programming in a very detailed way.
C Programming Complete Playlist on YouTube: Click Here
All the concepts discussed in this course are the models frequently asked in Campus Placements Questions, either in multiple-choice questions or as programming questions.
This entire course will help a Computer Science Engineering Student or a student in any other stream crack the campus placements drives held by Service-based Software or IT companies like TCS, Infosys, CTS, Wipro, Accenture, etc.
Table of Contents
Is Triangle or Not
Question
Check whether given points P1, P2, P3 form a triangle or not
Input
(3, 4)
(2, 1)
(1, 5)
Output: 1
Input
(1, -1)
(0, -1)
(-1, -1)
Output: 0
The following Structure is used to represent the Point and is already implemented in the default code. Do not write the definitions again in the code.
struct point; typedef struct point { int X; int Y; }Point;
In the function below we have to write our code.
int isTriangle(Point *P1, Point *P2,Point *P3) { //write your code here }
In the above code, there are some mistakes in the problem.
The explanation of the question is provided in the above YouTube link.