Average of two numbers not printing properly..
#include iostream
#include iomanip
using namespace std;
float avg(int a,int b)
{
float temp = static_cast((a+b)/2);
return temp;
}
int main() {
float m;
m = avg(1,2);
cout< return 0;
}
created
last reply
- 3
replies
- 1.3k
views
- 4
users