Advertisement
Guest User

Oglinditul

a guest
Mar 24th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int cmmogl ( int a, int b, int c, int d )
  5. {
  6. cout << "a = "; cin >> a;
  7. cout << "b = "; cin >> b;
  8. cout << "c = "; cin >> c;
  9. cout << "d = "; cin >> d;
  10.  
  11. int ogl;
  12.  
  13. while ( a != 0 ) {
  14. ogl = ogl * 10 + a % 10;
  15. a = a/10;
  16. }
  17. cout << ogl << " ";
  18.  
  19. while ( b != 0 ) {
  20. ogl = ogl * 10 + b % 10;
  21. b = b/10;
  22. }
  23.  
  24. cout << ogl << " ";
  25.  
  26.  
  27.  
  28. }
  29.  
  30.  
  31.  
  32. int main(){
  33.  
  34. int a,b,c,d;
  35. cout << cmmogl(a,b,c,d);
  36.  
  37.  
  38.  
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement