The distance between two cities (in km).is input through the keyboard Write a program to convert to print the distance in meters feet,imches and centimeter.

 The distance between two cities (in km). is input through the keyboard Write a program to convert to print the distance in meters feet, inches and centimeter.

  program--

\\conversion of distance

#include<stdio.h>

int main()

{

float km,m,cm,ft,inch;

printf("\n Enter the distance in kilometer :");

scanf("%f",&km);

m=km*1000;

cm=m*100;

inch=cm/2.54;

ft=inch/12;

 printf("Distance in meters=%f\n",m);

 printf("Distance in centimeter=%f\n",cm);

printf("Distance in feet=%f\n",ft);  

printf("Distance in inches=%f\n",inch);  

 return 0;

}

 OUTPUTs --

 Enter the distance in kilometers:4

Distance in meter=4000.00000

Distance in centimeter=400000.0000

Distance in feet=13123.359375

Distance in inches =157480.312500

1) calculate the simple interest  program click the link-- ---https://allcodescience.blogspot.com/2021/12/calculate-of-simple-

interest.html

 2 .Ramesh basic salary is input through the keyword .His dearness allowance is 40% of the basic salary and house rent allowance is 20% of basic salary write a program to calculate his gross salary.  click the link---- 

 



3.How will learn of c language?---

click the link   https://allcodescience.blogspot.com/2021/12/how-learn-of-c-language.html

 

Comments

Popular posts from this blog

If lengths of three sides of a tringle are input through the keyboard write a program to find the area of tringle.

the length and breadth of a rectangle and radius of a circle are input through the keyboard. write a program to calculate the area and perimeter of the rectangle, and the area and circumference of the circle

paper of size A0 has dimensions 1189 mmx 841 mm .Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides .Thus paper of size A1 would have dimensions 841 mm X 594 mm .Write a program to calculate the print paper sizes A0,A1,A2,.........A8.