I am trying to do assignment 0 on MIT open courseware, its an intro computer science and electrical engineering course. How do i create a program that asks user to enter date of birth and last name
the program is written in C++11 language , I recommend using the following online program: #include <iostream> using namespace std; int main() { char DOB[11];char lname[30]; cout<<"enter date of birth(DD/MM/YYYY): "; cin.getline(DOB, 11); cout<<"enter lastname: ";cin.getline(lname , 30); return 0; } compiler to use it : LINK: http://www.tutorialspoint.com/compile_cpp_online.php
The raw_input() function takes a prompt for an argument and returns the user's input as a string: foo = raw_input( "Type in something" ) print foo
Join our real-time social learning platform and learn together with your friends!