Question
C++


AT&T 3:07 PM 86%- class exercise week 3 J Done Detail Submission Grade class exercise week 3 Due: Feb 13, 2019 at 7:20 PM Thi
0 0
Add a comment Improve this question Transcribed image text
Answer #1

// This program will read the date entered by the user as the String and parse it to display the Day , month and Year using

// the substring function in C++

#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;


int main()
{
// Declaring variables
string date;
int mm, dd, yy;

// Getting the date entered by the user
cout << "Enter (date (mm/dd/yyyy)) :";
cin >> date;

/* parsing the string to get day
* month ,year and convert to integers
*/
mm = atoi(date.substr(0, 2).c_str());
dd = atoi(date.substr(3, 2).c_str());
yy = atoi(date.substr(6).c_str());

// Displaying the output.
cout << "Month entered :" << mm << " Day entered: " << dd << " Year entered: " << yy << endl;
return 0;
}

___________________

Output:

İ CAProgram Files (x86)\Dev-CpplMinGW64bin,DateparseToDDMMYY.exe Enter (date (mm/dd/yyyy> 02/08/2011 Month entered :2 Day ent

_________________Thank You

Add a comment
Know the answer?
Add Answer to:
C++ AT&T 3:07 PM 86%- class exercise week 3 J Done Detail Submission Grade class exercise...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Detail Submission Grade Week 13 Discussion Board Due: Jul 27, 2019 at 11:59 PM Explain the...

    Detail Submission Grade Week 13 Discussion Board Due: Jul 27, 2019 at 11:59 PM Explain the regulatory oversight structure of MCOs. What happens when there is a disagreement between local and federal regulation?

  • Grade Detail Submission Week 8: Discussion Due: Jun 22, 2019 at 11:59 PM Choose a commercial...

    Grade Detail Submission Week 8: Discussion Due: Jun 22, 2019 at 11:59 PM Choose a commercial on television or video on the internet related to a chronic and/or life-threatening illness 1) Explain what it is about 2) Did the commercial get the message across? Why or why not? If you were a patient, how would it make you feel? 3) How would you have put it together differently?

  • l AT&T 55% 11:20 PM Back M2D1: Nurse of the Future Detail Submission Grade M2D1: Nurse...

    l AT&T 55% 11:20 PM Back M2D1: Nurse of the Future Detail Submission Grade M2D1: Nurse of the Future Due: Jul 14, 2019 at 11:59 PM Note: You may not post to this discussion until week 2 Initial Discussion Post: Describe two (2) essential competencies that are necessary for the associate degree nurse of the future to provide safe patient care. Outline your plan to develop these essential competencies while you are enrolled in the Excelsior College associate degree nursing...

  • AT&T 12:43 PM 90% Back Key viewpoint DF Detail Submission Grade Key viewpoint DF Due: Mar...

    AT&T 12:43 PM 90% Back Key viewpoint DF Detail Submission Grade Key viewpoint DF Due: Mar 13, 2019 at 11:59 PM Describe the difference between one key viewpoint in Western medicine and either traditional Chinese Medicine, Ayurevedic Medicine, or Chiropractic Medicine. Minimum 250 words.Share a separate comment regarding a peer's post; designate as such. Please specify in subject line if this is your submission or your reply. Dashboard Calendar To Do Notifications nbox

  • No Service 11:43 PM 3896 "D Back EthnoHealth Detail Submission Grade EthnoHealth Due: Apr 24, 2019...

    No Service 11:43 PM 3896 "D Back EthnoHealth Detail Submission Grade EthnoHealth Due: Apr 24, 2019 at 11:59 PM Perform an EthnoHealth Interview with someone of a culture other than your own. Rubric will be provided. Include an introductory paragraph describing your interviewee and share a finding from your interview that would aid your peers in providing culturally competent care for your chosen population in your closing paragraph. Include two current (within 5 years) APA references. Dashboard Calendar To Do...

  • 6:031 LTE K Chapter 5 Discussion-myPHR Detail Submission Grade Chapter 5 Discussion myPHR Due: Feb 26,...

    6:031 LTE K Chapter 5 Discussion-myPHR Detail Submission Grade Chapter 5 Discussion myPHR Due: Feb 26, 2019 at 11:30 PM This assignment covers the following learning objectives: 1. Distinguish between computerized patient records, electronic patient records, and electronic health records Personal health records benefit both patients and the health care community. This assignment will familiarize students with a website maintained by AHIMA that addresses the This website also discusses how to create a personal health record. al health records Instructions....

  • 6:031 LTE K Chapter 5 Discussion-myPHR Detail Submission Grade Chapter 5 Discussion myPHR Due: Feb 26,...

    6:031 LTE K Chapter 5 Discussion-myPHR Detail Submission Grade Chapter 5 Discussion myPHR Due: Feb 26, 2019 at 11:30 PM This assignment covers the following learning objectives: 1. Distinguish between computerized patient records, electronic patient records, and electronic health records Personal health records benefit both patients and the health care community. This assignment will familiarize students with a website maintained by AHIMA that addresses the This website also discusses how to create a personal health record. al health records Instructions....

  • C++ Programing In this exercise, you will design a class memberType. The class has the following...

    C++ Programing In this exercise, you will design a class memberType. The class has the following data members: memberName. A string that holds the name of a person memberID. A string that holds the member identification number numBooks. An int that holds the number of books bought purchaseAmt. A double that holds the amount spent on books In addition, the class should have the following constructor and other member functions. Constructor. The constructor should accept the person’s name and member...

  • l T-Mobile 3:21 PM 45%. Reading: 12.1-12.2 Back Detail Submission Grade Read sections 12.1,12.2, respond to the following tems 1. Skim thru page 816, and think about how r(t) is a vector. Justify...

    l T-Mobile 3:21 PM 45%. Reading: 12.1-12.2 Back Detail Submission Grade Read sections 12.1,12.2, respond to the following tems 1. Skim thru page 816, and think about how r(t) is a vector. Justify that r(t)-sin()i cos(t)j 0 t 2) is a circle and describe how to draw the circle (where to start, with which direction) Write a set of parametric equation of ellipse 2. Skim thru example 3 and 4 of Section 12.1. Given a curve y f(x), how do...

  • Lab Exercise #11 Assignment Overview You will work with a partner on this exercise during your la...

    help with cse problem Lab Exercise #11 Assignment Overview You will work with a partner on this exercise during your lab session. Two people should work at one computer. Occasionally switch the person who is typing. Talk to each other about what you are doing and why so that both of you understand each step Part A: Class Date . Download the files for this laboratory exercise, then run the Python shell and enter the following commands: >>>import date >>help(...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT