---
title: "C语言入门经典"
author: "xrtkong"
date: "2011-10-10T23:17:26Z"
tags: []
categories: ["编程语言"]
slug: "c"
draft: false
lastmod: "2011-10-10T23:17:26Z"
id: 1189143
url: "https://xrtkong.iteye.com/blog/1189143"
---

/* programe  which rember user to input width and length in inches,then output the square of the room in square yard \*/  
#include&lt;stdio.h&gt;  
#include&lt;math.h&gt;  
int main(){  
    long length = 0L ;  
    long width = 0L ;  
    long sqreinches = 0L ;  
    float sqre = 0.0f;  
    printf(" Please input the room's width:");  
    scanf("%ld",&width);

    printf(" Please input the room's height:");  
    scanf("%ld",&length);

     sqreinches = length * width ;  
     sqre =  (float)sqreinches / 9 ;  
     printf("the sqre is %.2f",sqre);  
     return 0 ;  
}