Skip to content

Instantly share code, notes, and snippets.

@hocarm

hocarm/For_loop.c

Last active May 1, 2018
Embed
What would you like to do?
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