#include<conio.h>
float suma(float a,float b)
{
float res;
res=a+b;
return(res);
}
main()
{
printf("\nSuma 2 numeros");
float ai,bi;
printf("\nIngresa un numero: ");scanf("%f",&ai);
printf("Ingresa un numero: ");scanf("%f",&bi);
printf("\nLa suma es: %.2f",suma(ai,bi));
printf("\nPresione Enter");
getch();
}
No hay comentarios.:
Publicar un comentario