answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int x1, x2, x3, y1, y2, y3 ;

printf("\nEnter the Co-ordinates of first point(x1,y1)");

scanf("d",&1x, &y1);

printf("\nEnter the Co-ordinates of 2nd point(x2,y2)");

scanf("d",&x2, &y2);

printf("\nEnter the Co-ordinates of 3rd point(x3,y3)");

scanf("d",&x3, &y3);

if( (y2-y1)/(x2-x1)==(y3-y2)/(x3-x2) )

printf("The three points lie on straight line");

else

printf("The three points do not lie on straight line");

getch();

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

What are the different conditional jump instructions of 8051?

The 8051 microcontroller features several conditional jump instructions that allow the program to branch based on specific conditions. Key instructions include JC (Jump if Carry), JNC (Jump if No Carry), JZ (Jump if Zero), JNZ (Jump if Not Zero), JP (Jump if Positive), and JM (Jump if Minus). These instructions enable the microcontroller to make decisions and control the flow of the program based on the status of the flags in the accumulator or the special function registers.


What is platform dependency of c plus plus?

C++ has no platform dependency. If a compiler exists for a platform (and few don't) code can be written for that platform. Where platforms have different methods to do the same thing, conditional compilation can be used to cater for those differences, thus the same source code can be compiled on any platform simply by changing the definitions used by the conditional compilation directives. For instance, a program that caters for Unix and Windows platforms might contain the following conditional compilation: #ifdef __unix__ #include &lt;unistd.h&gt; #elif defined _WIN32 #include &lt;windows.h&gt; #endif The definition of __unix__ and _WIN32 must be mutually exclusive.


When you need to satisfy two or more criteria to initiate an event in a program you must make sure that the second decision is made entirely independently of the first decision?

Evaluate the criteria before executing the conditional expression. In pseudocode:result1 = evaluate( criteria1 );result2 = evaluate( criteria2 );if( result1 && result2 ) initiate_event;Note that this is not the same as the following:if( evaluate( criteria1 ) && evaluate( criteria2 )) initiate_event;If the evaluation of criteria1 fails for any reason, then the whole expression fails and criteria2 is never evaluated. so if the evaluations must be done independently of each other, then they must be done prior to the conditional expression, storing the results for use in the conditional expression.


What are the different symbols used in a program flow chart?

The most widely used symbols are:1. Start and end2. Arrows3. Processing steps3. Conditional Other symbols are:4. document symbol5. Manual Operation6. Data file


How many basic branching control structures are in python?

Python has three basic branching control structures: if, elif, and else. These structures allow for conditional execution of code blocks based on whether a specified condition evaluates to true or false. They enable the program to make decisions and execute different code paths accordingly.

Related Questions

What is a conditional cash transfer program?

A Conditional Cash Transfer program's main role is to provide the needed income for a family who may have low salary in order for them to live happily.


What program is not a cash transfer program?

Conditional Cash Transfer Programmes (CCTs) Conditional cash transfer programmes (CCTs) are a special form of social assistance schemes which provides cash to families subject to the condition that they fulfil specific behavioural requirements.


How can i enroll child in scared straight program program in Arkansas?

The Juvenile Detention Center does a Scared Straight tour.


How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


Is there a scared straight program in Chicago?

Check


Are there any scared straight programs in Denver Colorado?

Does denver have a scared straight program


What is the purpose of a conditional jump in programming and how does it affect the flow of execution in a program?

A conditional jump in programming is used to make decisions based on certain conditions. It allows the program to execute different sets of instructions depending on whether a specific condition is met. This affects the flow of execution by directing the program to different parts of the code based on the outcome of the condition, enabling it to perform different actions based on different scenarios.


How do you make a straight line on a laptop?

What specific? program?


Is there a scared straight program in Chicago Illinois?

Check


Do you have to have straight A's to get into the nursing program?

Nope 03o


What are conditional statements?

Conditional statements are used in programming to make decisions based on certain conditions. They allow the program to execute different code blocks depending on whether a condition is true or false. Common conditional statements include if, else, and else if.


What is branch processing?

Branch processing refers to the execution of different paths in a computer program based on conditional statements. It occurs when the program makes decisions, such as using &quot;if-else&quot; statements or switch cases, which determine which set of instructions to follow. This can impact performance, as branch prediction techniques are often employed in modern processors to minimize delays caused by these conditional paths. Efficient branch processing is crucial for optimizing code execution and enhancing overall program efficiency.