error: ‘lenght’ undeclared (first use in this function); did you mean ‘length’?
answer length
#include <stdio.h>
int main()
//declare the variables
float length,breadth,area;
//take inputs from the user
printf("please enter the value for length: ");
scanf("%f",&length);
printf("please enter the value for breadth: ");
scanf("%f",&breadth);
//calculate the results
area=length*breadth;
//output the calulated results
printf("the area of a rectangle is %f",area);
return 0;
error: redeclaration of ‘r’ with no linkage
5| float area,pie,r,r;
| ^
main.c:5:23: note: previous declaration of ‘r’ with type ‘float’
5| float area,pie,r,r;
| ^
#include <stdio.h>
int main()
//declare the variable
float radius,area;
float const PI=3.14;
//take input from the user
printf("Enter the radius of the circle: ");
scanf("%f", &radius);
//process the input
area = PI * radius * radius;
//output
printf("The area of the circle is: %.2f\n", area);
return 0;