#include <stdio.h>
int main() {
int villa[4][2];
int pop, i, j;
for(i=0; i<4; i++)
{
for(j=0; j<2; j++)
{
printf("%d층 %d호 인구수: \n", i+1, j+1);
scanf("%d", &villa[i][j]);
}
}
for(i=0; i<4; i++)
{
pop =0;
pop += villa[i][0];
pop += villa[i][1];
printf("%d층 인구수: %d \n", i+1, pop);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: