Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void cmmogl ( int a, int b, int c, int d )
- {
- cout << "a = "; cin >> a;
- cout << "b = "; cin >> b;
- cout << "c = "; cin >> c;
- cout << "d = "; cin >> d;
- int ogl = 0;
- while ( a!=0) {
- ogl = ogl * 10 + a % 10;
- a = a /10;
- }
- cout << ogl << " ";
- ogl = 0;
- while ( b!=0) {
- ogl = ogl * 10 + b % 10;
- b = b /10;
- }
- cout << ogl << " ";
- ogl = 0;
- while ( c!=0) {
- ogl = ogl * 10 + c % 10;
- c = c /10;
- }
- cout << ogl << " ";
- ogl = 0;
- while ( d!=0) {
- ogl = ogl * 10 + d % 10;
- d = d /10;
- }
- cout << ogl << " ";
- }
- int main(){
- int a,b,c,d;
- cmmogl(a,b,c,d);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement