Structure를 이용한 프로그래밍
페이지 정보
작성일 24-07-22 00:41
본문
Download : Structure를 이용한 프로그래밍.hwp
Structure를이용한프로그래밍
,공학기술,레포트
Structure를이용한프로그래밍 , Structure를 이용한 프로그래밍공학기술레포트 ,
순서
source
#include
struct house
{
int id;
long inc;
int member;
}
main()
{
struct house r[10]={
{1000,12000000,1},{1235,35000000,6},{3451,23000000,3},
{2541,23000000,2},{1432,6100000,4},{1021,1700000,5},
{9455,1200000,1},{7645,15000000,6},{6755,6600000,4},
{7131,63000000,3}
};
int i,k=0;
long p,ave,sum=0;
printf(`n(a)n`);
printf(`ID Number Annual Income() Household Membersn`);
for (i=0;i<10;i++) {
printf(`%4d %15ld %16dnn`,r[i].id,r[i].inc,r[i].member);
sum+=r[i].inc;
}
ave=sum/10;
printf(`n(b)n`);
printf(`Average household income = %ldn`,ave);
printf(`Household whose income exceed the averagen`);
printf(` ID Number Annual Incomen`);
for (i=0;i < 10;i++ )
if(r[i].inc>ave)
printf(`%10d %23ld n…(투비컨티뉴드 )
(a)
3451 23000000 3
1432 6100000 4
Structure를 이용한 프로그래밍
Download : Structure를 이용한 프로그래밍.hwp( 16 )



레포트/공학기술
설명
다.