Q1. WAF to input two numbers and find sum. 1
#include<stdio.h>
float sum(float a, float b, float c);
int main()
{
float a=10.5, b=1.2, c=5.5, d;
float x=10.5, y=1.2, z=5.5, s;
s=sum(x,y,z); //fun call
printf("Sum = %f\n",s);
d=sum(a,b,c); //fun call
printf("Sum = %f",d);
return 0;
}
float sum(float a, float b, float c)
{
float s = a+b+c;
return s;
}