Yasmine H.

asked • 09/20/15

2. Consider the following statements:

struct dateStruct
{
     int day; // assume 1 <= day <= 31;
     int month; // assume 1 <= month <= 12;        
     int year; // assume 0 <= year <= 2100;
};
struct student
{
    string name;
    dateStruct dob;
    int grades[5];
};
 
dateStruct today;
student s;
double average;
(a) Write a statement that makes today’s month represent February. (b) Write a statement that makes s’s name be Natalie Portman.
(c) Write a statement that makes s’s birth date the same as today’s.
(d) Write a statement that prints the month s was born.
(e) Write a segment of code that assigns average the average of s’s five test grades.

1 Expert Answer

By:

Keith B. answered • 10/01/15

Tutor
4.6 (22)

Software Engineer and Math Geek

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.