#include <stdio.h>
float calc(float num[])
{
float sum=0.0;
for (int i =0;i<6;++i)
{
sum=sum+num[i];
}
return sum;
}
int main()
{
float result,num[]={23.4,55,22.6,3,40.5,18};
result=calc(num);
printf("Result=%.2f",result);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: