cpp return float or int code example
Example: function return floatin c++
#include <iostream>
float sum(float a, float b)
{
return a+b;
}
int main(int argc, char *argv[])
{
float num1 = 10.2;
float num2 = 15.3;
float result = sum(num1,num2);
std::cout<< result;
return 0;
}