home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_03 / 174.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-21  |  487KB  |  2550x3300
Labels: book | box | computer | crt screen | poster | reckoner | screen
OCR: 174 Chapter 3 Basic Data Types Example 3-10: slope.c voi slope.c Synopsis The user enters the coordi inates of two points and the program will display the equat ion Obj ective To in the an line appl illustrate ied through the program use those of two float poi ints ing point types Include Files #incl lude <stdio h> Funct ion Prototypes void pri int NOILI resul t float x1 v2 float can yl be any float real x2 float numbers y2 PRECONDI POSTCONDITI ION Cal lculates di the splays slope the and equati y- ion intercept of the of line line and int main( void float x1, yl, x2 y2; The points Input the coordina tes of the poi ints printf( "Enter the first point In" pri int. f scanf pr intf scanf "Sf" &y1 pr: intf( "Enter the second point In" ); pri intf( "x scanf printf( scanf print result( x1, yl, x ...