Menu

Wednesday, 26 November 2014

Chapter 5,Problem 3:Object Oriented Programming by Robert Lafore in C++ Solution Manual

//zerosmaller
//Ahmad Furqan
//28-2-2013
#include <iostream>
#include <conio.h>
using namespace std;
void zerosmaller(int&,int&);
void main(void)
{
int a,b;
a=25;
b=20;
zerosmaller(a,b);
cout<<"a="<<a<<endl
<<"b="<<b<<endl;
_getch();
}
void zerosmaller(int& a,int& b)
{
if(a<b)
a=0;
else
b=0;
}

No comments:

Post a Comment