fork download
  1. // Matthew Santos CS1A Ch. 2, P. 81, #14
  2. /**************************************************
  3.  *
  4.  * DISPLAY PERSONAL INFORMATION
  5.  * ________________________________________________
  6.  *
  7.  * This code displays my name, address, telephone
  8.  * number, and college major.
  9.  * _________________________________________________
  10.  *
  11.  * INPUTS
  12.  * name : full name
  13.  * address : city, state, zip code
  14.  * phone : personal phone number
  15.  * major : current major in college
  16.  *
  17.  * OUTPUT
  18.  * personal infomation : name, address, phone, major
  19.  *
  20.  * *************************************************/
  21.  
  22. #include <iostream>
  23. using namespace std;
  24.  
  25. int main() {
  26.  
  27. string name = "Matthew Santos";
  28. string address = "30 Sevilla, Rancho Santa Margarita, CA 92688";
  29. string phone = "714-504-0401";
  30. string major = "Undeclared";
  31.  
  32. cout << "Name: " << name << "\n" << "Address: " << address << "\n" << "Phone Number: " << phone << "\n" << "Major: " << major << "\n";
  33.  
  34. return 0;
  35. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Name: Matthew Santos
Address: 30 Sevilla, Rancho Santa Margarita, CA 92688
Phone Number: 714-504-0401
Major: Undeclared