c++ float function code example
Example 1: how to make a float in C++
public float whatYourFloatIsCalled = 0;
public float whatIsYourFloat;
Example 2: 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;
}