fork(1) download
  1. // This program demonstrates a compile error.
  2. // Lihong Feng
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. int number;
  8. float total;
  9. cout << "Today is a great day for Lab"
  10. ;cout << endl <<
  11. "Let's start off by typing a number of your choice" << endl;
  12. cin >> number;
  13. total = number * 2;
  14. cout << total << " is twice the number you typed" << endl;
  15. return 0;
  16. }
Success #stdin #stdout 0s 4304KB
stdin
3
stdout
Today is a great day for Lab
Let's start off by typing a number of your choice
6 is twice the number you typed