---
title: "学习笔记"
author: "xrtkong"
date: "2011-10-10T22:49:47Z"
tags: []
categories: ["编程语言"]
slug: "untitled"
draft: false
lastmod: "2011-10-10T22:49:47Z"
id: 1189125
url: "https://xrtkong.iteye.com/blog/1189125"
---

/\*write a programe,rember user to input a distanc in inches,the output the distance in yard foot,inches\*/  
/\*one yard = 3 foot , one foot = 12 inches\*/  
#include&lt;stdio.h&gt;  
int main(){  
    long inches = 0L ;  
    long foot = 0L ;  
    long yard = 0L ;  
     
    printf(" Input the Inches : ");  
     
    scanf("%ld",&inches);  
    foot = inches / 12 ;  
    yard = foot / 3 ;

    printf("\\n 输入的英寸数为：%ld 码，%ld 英尺，%ld 英寸" , yard , foot , inches);

    return 0 ;

}