Tuesday, 25 August 2020

TRY THIS PROGRAM!!! (DISTANCE CALCULATION PROGRAM.)

IS IT POSSIBLE TO CALCULATE DISTANCE IN C PROGRAM????.

YES IT IS POSSIBLE. THE FOLLOWING PROGRAM IS USED TO CALCULATE DISTANCE IN C PROGRAMMING LANGUAGE.

#include<stdio.h>
#include<conio.h>
void main()
{
float a,b,c;
clrscr();
printf("\t\t\t\tDISTANCE CALCULATOR");
printf("\nEnter the meter to convert centimeter\n");
scanf("%f",&a);
b=a*100;
printf("\ncentimeter is %f\n",b);
printf("\nEnter the centimeter to convert meter\n");
scanf("%f",&a);
b=a/100;
printf("\nmeter is %f\n",b);
printf("\nEnter the kilometer to convert meter\n");
scanf("%f",&a);
b=a*1000;
printf("\nmeter is %f\n",b);
a=1.609344;
printf("\nEnter the miles to convert kilometer\n");
scanf("%f",&b);
c=b*a;
printf("\nkilometer is %f\n",c);
printf("\nEnter any key to exit...\n");
getch();
}
 I THINK YOU HAVE GOT THE RESULT AND ENJOYED THIS PROGRAM. 
 

No comments:

Post a Comment

C Programming

What is DBMS in brief?

A Database Management System (DBMS) is a software suite designed to efficiently manage, organize, store, manipulate, and retrieve data. It a...