Skip to content

Instantly share code, notes, and snippets.

@sachinsaxena25
Created July 17, 2019 16:37
Show Gist options
  • Save sachinsaxena25/8b222f0ca80330c5c01fd981ebbdc629 to your computer and use it in GitHub Desktop.
Save sachinsaxena25/8b222f0ca80330c5c01fd981ebbdc629 to your computer and use it in GitHub Desktop.
#include<stdio.h>
int main (void)
{
float kilometre = 0.0f;
printf("please enter the value of kilometre:\n");
scanf("%f", &kilometre);
float metre = 0.0f;
float feet = 0.0f;
float centimetre = 0.0f;
metre = kilometre * 1000.0f;
feet = metre / 3.0f;
centimetre = metre * 100.0f;
printf("metre:%.2f\n", metre);
printf("feet:%.2f\n", feet);
printf("centimetre:%.2f\n", centimetre);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment