Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void max_min(int *a, int *b)
- {
- if (*a > *b)
- {
- cout << *a << "is more than " << *b << endl;
- }
- else if (*b > *a)
- {
- cout << *b << "is more than " << *a << endl;
- }
- else {
- cout << "Man, this is the same numbers" << endl;
- }
- }
- int main() {
- string name = "Name";
- string& ptr = name;
- int a = 0;
- int* a = &a;
- int b = 0;
- int* b = &b;
- cin >> a;
- cin >> b;
- max_min(&a, &b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment