Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- //#include <iomanip>
- using namespace std;
- int main(int argc, char *argv[]) {
- ifstream stream(argv[1]);
- string line;
- int x, y, n;
- while(stream >> x >> y >> n){
- if((0<x<21) && (0<y<21) && (20<n<101))
- {
- for(int i=1; i<=n; i++){
- if((i%x || i%y) == 0){
- cout <<"FB\t";
- continue;
- }
- else if((i%x) == 0){
- cout <<"F\t";
- continue;
- }else if((i%y) == 0){
- cout <<"B\t";
- continue;
- }else
- cout << i << "\t";
- }
- cout << "\n";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement