#include <stdio.h>
/* A program to calculate a square area. */
int main()
{
int width, length, area;
width = 10;
length = 5;
area = width * length;
printf("The dimension is %d by %d\n", width, length);
printf("The area is %d.\n", area);
return 0;
}
Here, we want to output width and length.
Notice the two %d signs and the commas.