Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ofstream fout("iesire.txt");
- int main(){
- int i,j,k;
- int s1, s2;
- cin>>s1>>s2;
- for(i=1;i<=9 && i<=s1; ++i){
- for(j=0;j<=9;++j){
- for(k=0;k<=9 && k<=s2; ++k){
- if((s1-i>=0) && (s1-i<=9)){
- if((s2-k>=0) && (s2-k<=9)){
- fout<<i<<(s1-i)<<j<<k<<(s2-k);
- fout<<endl;
- }
- }
- }
- }
- }
- fout.close();
- return 0;
- }
- //1661
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement