Wednesday, September 17, 2014

Convert meter to feet

Cách đổi mét sang feet sử dụng ngôn ngữ lập trình C.

Với công thức ft =m * 3.2808

Code:

#include<stdio.h>
#include<conio.h>

int main()

{
   //declaration
int x;
double y;

//input
printf("nhap meter: ");
scanf("%d", &x);
y= x*3.2808;

//output
printf("feet= %0.4lf\n", y);
getch();
}

Kết quả: 



No comments:

Post a Comment