Name of this function?

I'm asked for the out put of a code, I calculated it, but it's also asking me for the "name" or what this function is called, provided that b<=a<=c.

It just takes (a-b)/(b-c)*100, does anyone know what this function is called? I'm assuming it has something to do with ratios or averages.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Example program
#include <iostream>
#include <string>
int fo(int a, int b, int c);
    int main()
{

std::cout<<fo(40,32,60);
return 0;
}
int fo(int a, int b, int c){
int r=0;
r=(double)(a-b)/(c-b)*100;
return r;
}
Topic archived. No new replies allowed.