CH15_ PROGRAMMING
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

CH15_ PROGRAMMING에 대한 보고서 자료입니다.

본문내용

, count = 0;
int temp = 0;
srand(time(NULL));
cout<<"고객이 서비스 받는 시간 : ";
for(int i = 0;i < 5; i++){
temp = rand()%30+1;
ready.push(temp);
cout< }
cout< cout<<"고객이 들어온 시간 : ";
for(i = 0;i < 5; i++){
temp = rand()%10+1;
client.push(temp);
cout< }
cout< count = client.size();
for(i = 0;i < 5; i++){
totalready = totalready + ready.front() - client.front();
ready.pop();
client.pop();
}
ave = totalready/count;
cout<<"고객의 평균 대기 시간 : "< return 0;
}
7. 철수와 영희가 자신들의 친구들을 결혼식에 초대하고자 한다.
#include
#include
#include
#include
#include
using namespace std;
int main()
{
vector chulsu;
vector younghee;
vector invite(10);
chulsu.push_back("CSK");
chulsu.push_back("BHJ");
chulsu.push_back("RDJ");
younghee.push_back("CSK");
younghee.push_back("LYD");
younghee.push_back("BHJ");
younghee.push_back("SJW");
sort(chulsu.begin(),chulsu.end(), less());
sort(younghee.begin(),younghee.end(), less());
cout<<"철수 친구 : ";
for(int i=0; i< chulsu.size(); i++)
cout<< chulsu[i] <<" ";
cout< cout<<"영희 친구 : ";
for(int j=0; j < younghee.size(); j++)
cout<< younghee[j] <<" ";
cout< copy(chulsu.begin(), chulsu.end(), invite.begin());
copy(younghee.begin(), younghee.end(), invite.begin()+i);
cout<<"철희와 영수친구 합 : ";
for(j=0; j < invite.size(); j++)
cout<< invite[j] <<" ";
cout< vector::iterator it;
for(j=0; j < invite.size(); j++)
{
int n = count(invite.begin(),invite.end(), invite[j]);
if(n >= 2)
{
it = remove(invite.begin(), invite.end(), invite[j]);
invite.erase(it, invite.end());
}
}
sort(invite.begin(), invite.end(), less());
cout<<"철희와 영수친구 합(중복제거): ";
for(j=0; j < invite.size(); j++)
cout<< invite[j] <<" ";
cout< return 0;
}

키워드

  • 가격2,300
  • 페이지수8페이지
  • 등록일2014.11.04
  • 저작시기2012.4
  • 파일형식한글(hwp)
  • 자료번호#945461
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니