fork download
  1. /*datatyped.cpp
  2. 12. jul. 2015
  3. Drxxl
  4. */
  5. #include <iostream>
  6. using namespace std;
  7. int main()
  8. {
  9. char letter = 'a';
  10. short age = 10;
  11. int count = 575;
  12. long numStars = 985467528;
  13. float pi = 3.14;
  14. double price = 89.65;
  15. string season = "summer";
  16.  
  17. cout<<"Letter: "<<letter<<endl;
  18. cout<<"Age: "<<age<<endl;
  19. cout<<"Count: "<<count<<endl;
  20. cout<<"Number of stars in the sky:"<<numStars<<endl;
  21. cout<<"Pi: "<<pi<<endl;
  22. cout<<"Price: $"<<price<<endl;
  23. cout<<season<<endl;
  24. return 0;
  25. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
Letter: a
Age: 10
Count: 575
Number of stars in the sky:985467528
Pi: 3.14
Price: $89.65
summer