C Program to Convert Miles into Meter

First, we're taking two variables named mile and meter in float data types.
Then, we'll get the value from the user in miles.
After getting the value we'll apply the formula to convert miles into meters.
How to Convert Miles into Meter in C?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
void main() | |
{ | |
//declaration of variable | |
float mile, meter; | |
//getting the value in mile | |
printf("Enter the value in mile"); | |
scanf("%f",&mile); | |
// formula to convert mile into meter | |
meter = (mile * 1609.34) ; | |
printf(" %f mile is equal to %f meter", mile, meter); | |
} |
Comments
Post a Comment