Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,b,num,cif1,cif2,med, z=1;
- int main()
- {
- cin >> a >> b;
- while (a!=0)
- {
- cif1=a%10; cif2=b%10;
- med=(cif1+cif2)/2;
- a=a/10; b=b/10;
- num=med*z+num;
- z=z*10;
- }
- cout << num;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement