fork download
  1. /******************************************************************************
  2.  
  3. Welcome to GDB Online.
  4. GDB online is an online compiler and debugger tool for C/C++.
  5. Code, Compile, Run and Debug online from anywhere in world.
  6.  
  7. *******************************************************************************/
  8. #include <iostream>
  9. #include <bits/stdc++.h>
  10. using namespace std;
  11.  
  12.  
  13.  
  14.  
  15. int main() {
  16. // your code goes here
  17. int x = 1;
  18. if (x == 2)
  19. printf("First sentence\n");
  20. else if (x != 1)
  21. printf("Second sentence\n");
  22. else if (x < 1)
  23. printf("Third sentence\n");
  24. else if (x = 0)
  25. printf("Fourth sentence\n");
  26. else if (x)
  27. printf("Last sentence\n");
  28. }
  29.  
  30.  
  31.  
Success #stdin #stdout 0.01s 5324KB
stdin
45
stdout
Standard output is empty