Skip to content

Instantly share code, notes, and snippets.

@hocarm
Last active May 1, 2018 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hocarm/7ac6fe725a97ba6b2347246cbbaa5cb7 to your computer and use it in GitHub Desktop.
Save hocarm/7ac6fe725a97ba6b2347246cbbaa5cb7 to your computer and use it in GitHub Desktop.
int main(void) {
unsigned long side; // Chiều dài của phòng đơn vị mét
unsigned long area; // Diện tích phòng đơn vị mét vuông
UART_Init(); // gọi subroutine để init uart
printf("This program calculates areas of square-shaped rooms\n");
for(side = 1; side < 50; side = side+1){
area = Calc_Area(side);
printf("\nArea of the room with side of %ld m is %ld sqr m\n",side,area);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment