c7-4-2.c 251 B

12345678910111213141516
  1. #include <stdio.h>
  2. float add(float x,float y)
  3. {float z;
  4. z=x+y;
  5. return(z);
  6. }
  7. int main()
  8. {
  9. float a,b,c;
  10. printf("Please enter a and b:");
  11. scanf("%f,%f",&a,&b);
  12. c=add(a,b);
  13. printf("sum is %f\n",c);
  14. return 0;
  15. }