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