Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- std::vector<int> f(int n)
- {
- std::vector<int> w;
- for(int i=100;i<=999;i++)
- {
- if(i%n==0)
- {
- w.push_back(i);
- break;
- }
- else continue;
- }
- return w;
- }
- int main()
- {
- int n;
- std::cin>>n;
- f(n);
- for(i=0;i<w.size();i++)
- std::cout<<i;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement