Advertisement
rafikamal

Feet - Meter Conversion

Jan 3rd, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.38 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     float num;
  6.     int choice;
  7.  
  8.     printf("Enter number: ");
  9.     scanf("%f",&num);
  10.  
  11.     printf("1.feet to metre\n2.metre to feet\n\n");
  12.     printf("Select choice:  ");
  13.     scanf("%d",&choice);
  14.  
  15.     if(choice==1) printf("The value in metre is= %f",num*3.28);
  16.     if(choice==2) printf("The value in feet is= %f",num/3.28);
  17.  
  18.     return 0;
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement