The input is wrong, must be delimited with space. Better is to write
clean code and seperate both inputs:
int main()
{
float length, breadth, area;
printf("enter length:");
scanf("%f",&length,);
printf("breadth of the rectangle:");
scanf("%f",&breadth);
area = areaofrect(length,breadth);
printf("the area of the rectangle is:%f",area);
return 0;
}
it is clearer, easier and understandable and more fun to read ;-)