hey im doing a intro programming class and Im running into some problems. would really appreciate some help to see where I went wrong. Been trying to figure it out for hours now. Someone please help me out(adsbygoogle = window.adsbygoogle || []).push({});

These are my errors

c: In function ‘main’:

c:33:9: error: expected identifier or ‘(’ before ‘=’ token

This is the code:

#include <stdio.h>

#include <math.h>

int main (void)

{

float distance;

int x1,x2;

int y1,y2;

printf("The three types of angles in triangles are: Right angles,Obtuse Angles, and Acute angles") ;

printf("Three kinds of triangles are: Equilateral Triangles,Isosceles Triangles and Scalene Triangles") ;

printf(" The Pythagorean Theorem is : a2+b2=c2") ;

printf("The Distance Formula is: sqrt(pow(x2-x1,2) + pow(y2-y1,2)") ;

printf("Please enter First X value") ;

scanf("%d",&x1) ;

printf("Please enter Second X Value") ;

scanf("%d",&x2) ;

printf("please enter First Y Value") ;

scanf("%d",&y1) ;

printf("Please enter Second Y Value") ;

scanf("%d",&y2) ;

float=sqrt(pow(x2-x1,2) + pow(y2-y1,2);

printf("Distance is %f",distance);

return 0;

}

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Error in code

Loading...

Similar Threads for Error code |
---|

C/++/# Question about running "executables" without source code |

Web Scraping Py Script Generates Error for Old Norse Chars |

Python Numerical integration 'quad' error |

Fortran Handling underflow errors in fortran 90 |

**Physics Forums | Science Articles, Homework Help, Discussion**