Program is to find the maximum from two numbers, C/C++ Programming

Program is to find the maximum from two numbers:

Program is to find the maximum from two numbers entered by the user having pointer variable as parameter

void main()

  {

  clrscr();

  int a,b,ans;

  cout<<" enter the first number ";

  cin>>a;

  cout<<" enter the second number ";

  cin>>b;

  ans=*max(&a,&b);

  cout<<" The maximum of two numbers is :"<

  }

 

int *max(int *a,int *b)

  {

  if (*a>*b)

   return a;

  else

    return b;

  }

Posted Date: 10/19/2012 7:55:16 AM | Location : United States







Related Discussions:- Program is to find the maximum from two numbers, Assignment Help, Ask Question on Program is to find the maximum from two numbers, Get Answer, Expert's Help, Program is to find the maximum from two numbers Discussions

Write discussion on Program is to find the maximum from two numbers
Your posts are moderated
Related Questions

I need vsti program Project Description: Knowledge of vsti programs, and music is a plus, ex: nexus I will input the sounds I just need the interface built Skills required

Problem : Change to palindrome A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your ta

Ravi is a newbie to the programming and while learning the programming language he came to know the following rules:


Why many companies are switching their current business language to PHP? Where PHP basically used? PHP is rapidly gaining popularity and numerous companies are switching their

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send


how to write the code for operation research

Receive 3 numbers and display them in ascending order from smallest to largest ed#