How to write a c program to convert feet to meter and meter to feet in c programming ?
Solution:
#include <stdio.h>
int main()
{
float num;
int choice;
printf("Enter number: ");
scanf("%f",&num);
printf("1.feet to metre\n2.metre to feet\n\n");
printf("Select choice: ");
scanf("%d",&choice);
if(choice==1) printf("The value in metre is= %f",num*3.28);
if(choice==2) printf("The value in feet is= %f",num/3.28);
return 0;
}