# Convert Yard and Feet to Miles coderinme

#### Convert Yard and Feet to Miles coderinme

Convert Yard and Feet to Miles coderinme
In this we are going to convert yard and feet into miles. Before that we need to know the relation among these.
There are 5280 feet per mile
There are 3 feet in a yard.

Let’s write a function that takes input of yards and feet (whole numbers) and calculate and returns an output of the total number of miles(a floating-point value). As we know there are 5280 feet per mile. Also there are 3 feet in a yard. So Using appropriate parameter passing and appropriate return mechanism, appropriate data types, we shall code for this.
For example, with inputs of 1760 yard and 1320 ft, the result would be 1.25 miles. Call this function from the main program with different set of values and print the output.

``````#include<stdio.h>
float f(float feet,float yard)
{
float miles;
feet = 3 * yard + feet ;
miles = feet / 5280.0;
return miles;
}
int main()
{
float feet,yard;
printf("\nEnter total Yards: ");
scanf("%f", &yard);
printf("Enter total Feets: ");
scanf("%f", &feet);
printf("\nFeet = %.2f , Yard = %.2f \nEquivalent Miles = %.2f\n",feet,yard,f(feet,yard));
return 0;
}
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.84830326,"math_prob":0.98745143,"size":1622,"snap":"2020-45-2020-50","text_gpt3_token_len":393,"char_repetition_ratio":0.1025958,"word_repetition_ratio":0.03731343,"special_character_ratio":0.25585696,"punctuation_ratio":0.15805471,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9815499,"pos_list":[0,1,2],"im_url_duplicate_count":[null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-19T22:02:42Z\",\"WARC-Record-ID\":\"<urn:uuid:e7857f73-0085-4ccb-8c79-ff552421b58b>\",\"Content-Length\":\"78605\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5b9b931f-8234-4542-b752-718fe5629b77>\",\"WARC-Concurrent-To\":\"<urn:uuid:a784edbd-bb63-4a3a-a0c7-2a85f8eb568c>\",\"WARC-IP-Address\":\"34.93.198.169\",\"WARC-Target-URI\":\"https://coderinme.com/convert-yard-and-feet-to-miles-coderinme/\",\"WARC-Payload-Digest\":\"sha1:SM7YUDMLM3CNO4H3E4RM2QTZ3SGUUZZQ\",\"WARC-Block-Digest\":\"sha1:4UA735CATDRZGZWB3YCVLY6OZLT6HEWN\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107866404.1_warc_CC-MAIN-20201019203523-20201019233523-00164.warc.gz\"}"}