fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main(){
  5.  
  6. string i= "Hello world";//Literally what's in quotes
  7. bool j= true; //True or false -- 0, 1, true, false
  8. char k= 'a';
  9.  
  10. if(j==true){
  11. if(k=='a'){
  12. cout<< i;
  13. }
  14. }
  15. else {
  16. cout << "Whoops, false";
  17. }
  18.  
  19. int m = 1; // Interger number, whole number. -32,768 - 32,767
  20. long n =123534241431;//Used to store numbers bigger than an int
  21. float o = 1233.12344; // Floating point number
  22. double p = 12353252313.123123; //is a float, with double the storage space
  23.  
  24.  
  25.  
  26. return 0;
  27. }
  28.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:20: error: integer constant is too large for ‘long’ type
prog.cpp: In function ‘int main()’:
prog.cpp:20: warning: overflow in implicit constant conversion
prog.cpp:19: warning: unused variable ‘m’
prog.cpp:20: warning: unused variable ‘n’
prog.cpp:21: warning: unused variable ‘o’
prog.cpp:22: warning: unused variable ‘p’
stdout
Standard output is empty