C Program KM to Meters Conversion

By | March 6, 2020

C Program KM to Meters Conversion

#include <stdio.h>
int main()
{
  
  int meters, kilometers;

  printf("Enter distance in Kilometers=");
  scanf("%d", &kilometers);

  meters = kilometers * 1000;

  printf("%d Kilometers are equal to %d meters", kilometers, meters);

  return 0;
}

Output

Enter distance in Kilometers=75
75 Kilometers are equal to 75000 meters
Press Enter to return to Quincy…

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *