Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- void main()
- {
- int a,b,c,n;
- ifstream inStream;
- inStream.open("input.txt");
- ofstream outStream;
- outStream.open("output.txt");
- inStream >> a >> b >> c;
- n = a - b;
- while(n<c)
- {
- n = n + b;
- outStream << n << endl;
- }
- }
- /*
- 초항 a , 등차 b , 말항 c, 초기값 n
- 영남이공대학교 사이버보안과 14학번
- Yeungnam University College [IN KR]
- http://www.ync.ac.kr/
- */
Advertisement
Add Comment
Please, Sign In to add comment