Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int vc[10];
- int main()
- {
- ifstream f("ciffrecv.in");
- ofstream g("ciffrecv.out");
- int cif;
- while (!f.eof())
- {
- f >> cif; ++vc[cif];
- }
- cif=7;
- if (vc[cif]) g << cif << " " << vc[cif];
- else if (vc[cif-2]) { cif-=2; g << cif << " " << vc[cif]; }
- else if (vc[cif-4]) { cif-=4; g << cif << " " << vc[cif]; }
- else if (vc[cif-5]) { cif-=5; g << cif << " " << vc[cif]; }
- }
- Citește mai multe pe Brainly.ro - https://brainly.ro/tema/5645295#readmore
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement