Saturday, 21 January 2012

To find maximum of two no.s using Function / Recursion


#include<stdio.h>
#include<conio.h>
void main()
{
int max(int,int);
int x,y,m;
clrscr();
printf("enter two numbers\n");
scanf("%d%d",&x,&y);
m=max(x,y);

printf("The maximum number is %d",m);
getch();
}
int max(int n1,int n2)
{
int max;
if(n1>n2)
max=n1;
else
max=n2;
return(max);
}


For 8051 microcontroller programming :http://assemblylanguage8051.blogspot.in/

Jai Ho - HD Hindi Movie Digital Poster [2014] Salman Khan by A-Music

No comments:

Post a Comment