What is unterminated character constant error?
here is the code that gives me that error:
Code:
#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
float a,b,c,x;
printf("Use this to work out the length of the hypotenuse on a right angled triangle.\n");
printf("Please enter a:");
scanf("%f",&a);
printf("\nPlease enter b:);
scanf("%f",&b);
// a*a+b*b=c*c;
x=a*a+b*b;
c=sqrt(x);
printf("\nThe triangle's hypotenuse has a length of %f ",c);
getch();
return 0;
}
and the part compiler tells me where the error occurs:
Code:
printf("\nThe triangle's hypotenuse has a length of %f ",c);