Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"stdafx.h"
- #include "string"
- #include <iostream>
- /*
- using function by refrence multiple two numbers (a,b) and print the resualt in main
- */
- using namespace std;
- void mult(int &a, int &b) {
- a*=2;
- b*=2;
- }
- int main()
- {
- int a, b;
- cout << "a : ";
- cin >> a;
- cout << "b : ";
- cin >> b;
- mult(a, b);
- cout<<b<<endl<<a<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment