Source code
#include <stdio.h>
void largerof(double x,double y){
if(x>y){
y=x;
}
else{
x=y;
}
printf("\nThe value after:\nx= %0.2f \ny= %0.2f",x,y);
}
int main()
{
double x=23.55;
double y=56.27;
printf("The value before:\nx= %0.2f \ny= %0.2f",x,y);
largerof(x,y);
return 0;
}
Output 1
Output 2
Comments
Leave a comment