/*--------------------------------------------------------------------*/ /* rect.c */ /* Author: Bob Dondero */ /*--------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------*/ static int iLength; static int iWidth; static int iPerim; /*--------------------------------------------------------------------*/ /* Read a rectangle's length and width from stdin, and write its perimeter to stdout. Return 0. */ int main(void) { printf("Rectangle length: "); scanf("%d", &iLength); printf("Rectangle width: "); scanf("%d", &iWidth); iPerim = 2 * (iLength + iWidth); printf("The rectangle's perimeter is %d.\n", iPerim); return 0; }