C++ 프로그램
- 최초 등록일
- 2010.01.15
- 최종 저작일
- 2006.04
- 5페이지/ 한컴오피스
- 가격 1,000원
소개글
문제해석
Develope a C++ program that will determine whether a department - store customer has ex-ceeded the credit limit on a charge accont. For each customer, the following facts are available:
a) Account number(an integer)
b) Balance at the beginning of the month
c) Total fo all items charged b this customer this month
d) Total of all credits applied to this customer`s account rhis month
e) Aloowed credit limit
The program should use a while statement to input each of yhese facts, calculate the new balance(= beginning balance + charges - credits) and determine whether the new balance exeeds the customer`s credit limit. For those customers whose credit limit is exeeded, the program should display the customer`s account number, credit limit, new balance and message "Credit Limit Exeeded."
목차
1.문제해석
2. 알고리즘
3. 입력과 출력의 정의
4.주석과 소스
본문내용
2. 알고리즘
- iostream과 iomanip 헤더파일을 include 한다.
- 사용자로부터 변수 account, balance, charge, credit, limit을 입력 받는다.
- Newbalance(= beginning balance + charges - credits)값이 limit보다 크면 "Credit Limit Exeeded." 메시지 출력
- Newbalance 값이 limit보다 작으면 newbalance값을 출력해준다.
- while루프를 돌려서 사용자가 account값에 -1을 입력하기 전까지 실행한다
3. 입력과 출력의 정의
입력 : 변수 account, balance, charge, credit, limit
참고 자료
없음