fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. double k=1, q ;
  7. int a,b,count=0;
  8.  
  9. cout << "Enter A ";
  10. cin>>a;
  11. cout << "Enter B ";
  12. cin>>b;
  13. for (int i=a; i<=b;i++){
  14. k*=i;
  15. count++;
  16. }
  17.  
  18. cout << "Sum = " << k << "!\n";
  19. cout << "Count = " << count << "!\n";
  20. cout << "Avarage = " << pow(k, 1/count) << "!\n";
  21. }
  22.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:20:42: error: ‘pow’ was not declared in this scope
   cout << "Avarage = " <<  pow(k, 1/count) << "!\n";
                                          ^
stdout
Standard output is empty