Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a; // Globally copying it here because I don't feel like cluttering int main up even more.
- int b; //
- int c; //
- int dividemultiply (int a, int b=2, int c=4) //
- {
- int r;
- r=a/b*c;
- return (r);
- }
- int main ()
- {
- cout << "Input a number.\n";
- cin >> a; //It always crashes after you put a number in... No idea why.
- cout << dividemultiply (a,14,c); //A is supposed to be defined by the line above. C is supposed to be defined by line 9.
- cout << endl;
- cout << dividemultiply (a,b,2); //A is supposed to be defined by line 19. B is supposed to be defined by line 9.
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment