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:7:6: error: stray ‘\302’ in program
 cout « "Enter A ";
      ^
prog.cpp:7:7: error: stray ‘\253’ in program
 cout « "Enter A ";
       ^
prog.cpp:8:4: error: stray ‘\302’ in program
 cin»a;
    ^
prog.cpp:8:5: error: stray ‘\273’ in program
 cin»a;
     ^
prog.cpp:9:6: error: stray ‘\302’ in program
 cout « "Enter B ";
      ^
prog.cpp:9:7: error: stray ‘\253’ in program
 cout « "Enter B ";
       ^
prog.cpp:10:4: error: stray ‘\302’ in program
 cin»b;
    ^
prog.cpp:10:5: error: stray ‘\273’ in program
 cin»b;
     ^
prog.cpp:16:6: error: stray ‘\302’ in program
 cout « "Sum = " « k « "!\n";
      ^
prog.cpp:16:7: error: stray ‘\253’ in program
 cout « "Sum = " « k « "!\n";
       ^
prog.cpp:16:18: error: stray ‘\302’ in program
 cout « "Sum = " « k « "!\n";
                  ^
prog.cpp:16:19: error: stray ‘\253’ in program
 cout « "Sum = " « k « "!\n";
                   ^
prog.cpp:16:23: error: stray ‘\302’ in program
 cout « "Sum = " « k « "!\n";
                       ^
prog.cpp:16:24: error: stray ‘\253’ in program
 cout « "Sum = " « k « "!\n";
                        ^
prog.cpp:17:6: error: stray ‘\302’ in program
 cout « "Count = " « count « "!\n";
      ^
prog.cpp:17:7: error: stray ‘\253’ in program
 cout « "Count = " « count « "!\n";
       ^
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:18:6: error: stray ‘\302’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
      ^
prog.cpp:18:7: error: stray ‘\253’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
       ^
prog.cpp:18:22: error: stray ‘\302’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
                      ^
prog.cpp:18:23: error: stray ‘\253’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
                       ^
prog.cpp:18:41: error: stray ‘\302’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
                                         ^
prog.cpp:18:42: error: stray ‘\253’ in program
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
                                          ^
prog.cpp: In function ‘int main()’:
prog.cpp:7:9: error: expected ‘;’ before string constant
 cout « "Enter A ";
         ^~~~~~~~~~
prog.cpp:8:6: error: expected ‘;’ before ‘a’
 cin»a;
      ^
prog.cpp:9:9: error: expected ‘;’ before string constant
 cout « "Enter B ";
         ^~~~~~~~~~
prog.cpp:10:6: error: expected ‘;’ before ‘b’
 cin»b;
      ^
prog.cpp:16:9: error: expected ‘;’ before string constant
 cout « "Sum = " « k « "!\n";
         ^~~~~~~~
prog.cpp:17:9: error: expected ‘;’ before string constant
 cout « "Count = " « count « "!\n";
         ^~~~~~~~~~
prog.cpp:18:9: error: expected ‘;’ before string constant
 cout « "Avarage = " « pow(k, 1/count) « "!\n";
         ^~~~~~~~~~~~
stdout
Standard output is empty