fork download
  1. //Andres Guzman CSC5 Chapter 2, P. 83, #14
  2. //
  3. /**************************************************************
  4. *
  5. * DISPLAY INPUTED INFORMATION
  6. * ____________________________________________________________
  7. * This program displays personal information of the programmer
  8. *
  9. * Computation is based on the formulas:
  10. * ____________________________________________________________
  11. * INPUT
  12. * name : programmers name
  13. * address : programmers address
  14. * telephone : programmers telephone number
  15. * major : programmers proposed major
  16. * OUTPUT
  17. * name : programmers name
  18. * address : programmers address
  19. * telephone : programmers telephone number
  20. * major : programmers proposed major
  21. **************************************************************/
  22. #include <iostream>
  23. #include <string>
  24. using namespace std;
  25.  
  26. int main ()
  27. {
  28. string name;
  29. string telephone;
  30. string major;
  31. string address;
  32. //
  33. //Initialzing Variables
  34. name = "Andres Guzman";
  35. telephone = "(123)456-7890";
  36. major = "Robotics";
  37. address = "00000 Address Ave, Moreno Valley, CA, 92553";
  38. //
  39. //Output Results
  40. cout << "Name: " << name << endl;
  41. cout << "Address: " << address << endl;
  42. cout << "Telephone: " << telephone << endl;
  43. cout << "Major: " << major << endl;
  44. return 0;
  45. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Name: Andres Guzman
Address: 00000 Address Ave, Moreno Valley, CA, 92553
Telephone: (123)456-7890
Major: Robotics