Mlie

10-21-2

Sep 11th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. void main()
  6. {
  7.     int a,b,c,n;
  8.  
  9.     ifstream inStream;
  10.     inStream.open("input.txt");
  11.  
  12.     ofstream outStream;
  13.     outStream.open("output.txt");
  14.  
  15.     inStream >> a >> b >> c;
  16.  
  17.     n = a - b;
  18.     while(n<c)
  19.     {
  20.         n = n + b;
  21.         outStream << n << endl;
  22.     }
  23. }
  24. /*
  25.  
  26. 초항 a , 등차 b , 말항 c, 초기값 n
  27.  
  28.    영남이공대학교 사이버보안과 14학번
  29.    Yeungnam University College [IN KR]
  30.    http://www.ync.ac.kr/              
  31.  
  32. */
Advertisement
Add Comment
Please, Sign In to add comment