亲测,有用,根据你的程序改的,改了几个地方,自己看吧!
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
double length = 0.0;
double breadth = 0.0;
const double a = 12.0;
const double b = 3.0;
double S = 0.0;
printf("please enter the length of the room ,in whole feet:");
scanf_s("%lf", &length);
printf("Please enter the breadth of the roon ,in whole inches:");
scanf_s("%lf", &breadth);
length /= 3;
breadth /= 12;
S = length*breadth;
printf("the square of the room is %lf square yards.", S);
system("pause");
return 0;