Driver Code
int main ( ) { Vector A = { { 0 , 0.1 } , { 100 , 0.1 } , { 200 , 0.2 } , { 333 , 0.3 } , { 400 , 0.3 } } ; Vector B = { { 100 , 0.1 } , { 200 , 0.5 } , { 700 , 0.4 } } ; float avg_A = calculate_mean ( A ) ; float avg_B = calculate_mean ( B ) ; float std_A = calculate_std ( A ) ; float std_B = calculate_std ( B ) ; cout << " For ▁ Investment ▁ A " << endl ; cout << " Average : ▁ " << avg_A << endl ; cout << " Standard ▁ Deviation : ▁ " << std_A << endl ; cout << " Normalised ▁ Std : ▁ " << std_A / avg_A << endl ; cout << " For ▁ Investment ▁ B " << endl ; cout << " Average : ▁ " << avg_B << endl ; cout << " Standard ▁ Deviation : ▁ " << std_B << endl ; cout << " Normalised ▁ Std : ▁ " << std_B / avg_B << endl ; ( std_B / avg_B ) < ( std_A / avg_A ) ? cout << " Investment ▁ B ▁ is ▁ less ▁ risky STRNEWLINE " : cout << " Investment ▁ A ▁ is ▁ less ▁ risky STRNEWLINE " ; return 0 ; }