Need some help with some code
Here is my program... cant get the square meters and square feet to calculate. What am i doing wrong. I appreciate any help you can give....
not homework just an excercise.
#include <stdio.h>
Code:
int main()
{
/* Vaible declarations */
int cv_factor=36*36; /* Conversion factor to convert */
int length_yds; /* Length in yards; input by user */
int width_yds; /* Width in yards; input by user */
int area_in_yards;
int area_in_feet;
int square_yards;
int square_feet;
int square_inches;
int square_meters;
int area_in_inches;
int feet_cv_factor=3*3; /* Conversion factor to convert */
/* Accept user input for length and width of lawn in yards */
printf("input length and width of lawn in yards ");
scanf("%d%d", &length_yds, &width_yds);
/* Compute area of lawn in square yards, square feet, square inches and square meters */
area_in_yards= (length_yds * width_yds);
area_in_feet= (area_in_yards * feet_cv_factor);
square_inches= (area_in_yards * cv_factor);
square_feet= (area_in_yards * 9);
square_meters= (area_in_yards * 0.83612736);
printf("\Lawn in square yards = %d\n", area_in_yards);
printf("Lawn in square feet = %d\n", square_feet);
printf("\Lawn in square inches = %d\n", square_inches);
printf("\Lawn in square meters = %d\n", square_meters);
return 0;
}