Answers for "function return floatin c++"

C++
0

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;
}
Posted by: Guest on April-08-2021

Browse Popular Code Answers by Language