Write a C program to convert meters into kilometers.
#include<stdio.h>
#include<conio.h>
void main()
{
int km,m;
clrscr();
printf("Enter the miter ==>");
scanf("%d",&m);
km=m/1000;
printf("km=%d",km);
getch();
}
--------------------------------------------------------------------------------
Write a C program to convert kilometers to meters
#include<stdio.h>
#include<conio.h>
void main()
{
int meters,kilometrs;
clrscr();
printf("\n\nEnter the kilometers =>");
scanf("%d",&kilometrs);
meters=kilometrs*1000;
printf("\nmeters=%d",meters);
getch();
}
Would you like to help me to convert kilometers into meters and meters into kilometers in a same program?
ReplyDeleteFor Example:
The program ask to the user which operation do you want to perform either converting km to m or m to km.
If you help me I shall be very thankful to you.
Have a nice day
Waiting for your code
Muhammad Shumail Mushtaq Jutt
Where is output
ReplyDeletePlz give me the C code to convert hours in mili seconds?
ReplyDelete