fork download
  1. #include <iostream>
  2. # include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {int i=0,j=0;
  7.  
  8. int c[100],m,n,z=0,g=0,res2=1,y=0,​res=0;
  9. char op;
  10. cin >>m;
  11. cin >>n;
  12. j=n;
  13. for (int k=0;k<m;k++)
  14. { for (z=0;z<n;z++)
  15. {
  16. cin >> c[z];}
  17.  
  18. cin>> op;
  19. for ( j=n;j<2*n;j++)
  20. {
  21. cin >> c[j]; }
  22. i=0;j=n;
  23.  
  24. if (op=='+')
  25. for (g=0;g<n;g++)
  26. { res = c[i]+c[j];
  27.  
  28. cout <<res<<endl;
  29. i++;
  30. j++;}
  31.  
  32. if (op=='-')
  33. for (g=0;g<n;g++)
  34. { res = c[i]-c[j];
  35.  
  36. cout <<res<<endl;
  37. i++;
  38. j++;}
  39.  
  40.  
  41.  
  42.  
  43. if (op=='/')
  44.  
  45. for ( g=0;g<n;g++)
  46. {if (c[j]==0)
  47. cout << "Erorr"<<endl;
  48. else
  49. cout <<c[i]/ c[j];
  50. i++;
  51. j++;}
  52.  
  53. if (op=='%')
  54. for (g=0;g<n;g++)
  55. { res =( c[i]%c[j]);
  56.  
  57. cout <<res<<endl;
  58. i++;
  59. j++;}
  60.  
  61.  
  62. if (op=='^')
  63. for (g=0;g<n;g++)
  64.  
  65. {res2=pow((double)c[i],(double)c[j]);
  66.  
  67. cout <<res2<<endl;
  68.  
  69. i++;j++;
  70. }
  71.  
  72. if (op=='*')
  73. for (g=0;g<n;g++)
  74. { res = c[i]*c[j];
  75.  
  76. cout <<res<<endl;
  77.  
  78. i++;
  79. j++;}}
  80. return 0;
  81. }
  82.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8: error: stray ‘\342’ in program
prog.cpp:8: error: stray ‘\200’ in program
prog.cpp:8: error: stray ‘\213’ in program
prog.cpp:65: error: stray ‘\342’ in program
prog.cpp:65: error: stray ‘\200’ in program
prog.cpp:65: error: stray ‘\213’ in program
prog.cpp: In function ‘int main()’:
prog.cpp:8: warning: unused variable ‘y’
stdout
Standard output is empty