fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int k, s, count=0;
  6. scanf("%d%d\n",&k,&s) ;
  7. for(int i=0;i<=k;i++) {
  8. int x, y, z;
  9. if(x+y+z=s) {
  10. count++;
  11. }}
  12. printf("%d\n",count) ;
  13.  
  14. return 0;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2 2
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:10: error: lvalue required as left operand of assignment
 if(x+y+z=s) {
          ^
stdout
Standard output is empty