Created
March 4, 2018 10:48
-
-
Save hocarm/c570d14521101b80a4ecbc319cba5621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(void) { | |
unsigned long side; // room wall meters | |
unsigned long area; // size squared meters | |
UART_Init(); // call subroutine to initialize the uart | |
printf("This program calculates areas of square-shaped rooms\n"); | |
side = 1; | |
while(side < 50){ | |
area = Calc_Area(side); | |
printf("\nArea of the room with side of %ld m is %ld sqr m\n",side,area); | |
side = side+1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment