answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

Is jack dawson hot?

Jack Dawson is a fictional character from the movie, Titanic. Jack Dawson was played by Leonardo DiCaprio. Many women in the world to think he is a hot man.


Jack dawson real name?

Leonardo DiCaprio <3


How to print the marks of 10 students in c plus plus?

#include<iostream> #include<iomanip> #include<vector> #include<string> #include<random> #include<time.h> struct student_t { unsigned m_student_id; std::string m_student_name; student_t(const unsigned student_id, const std::string& student_name): m_student_id(student_id), m_student_name(student_name) {} }; struct students_t : std::vector<student_t> { students_t() : std::vector<student_t> () { push_back( student_t( 1, "Albert Black")); push_back( student_t( 2, "Charlie Dawson")); push_back( student_t( 3, "Eric Farrel")); push_back( student_t( 4, "Gary Houston")); push_back( student_t( 5, "Iain Jackson")); push_back( student_t( 6, "Kevin Lawson")); push_back( student_t( 7, "Michael Nicholson")); push_back( student_t( 8, "Oscar Peterson")); push_back( student_t( 9, "Robert Stevenson")); push_back( student_t( 10, "Tony Urquart")); } }; struct subject_t { unsigned m_subject_id; std::string m_subject_name; subject_t(const unsigned subject_id, const std::string& subject_name): m_subject_id(subject_id), m_subject_name(subject_name) {} }; struct subjects_t : std::vector<subject_t> { subjects_t() : std::vector<subject_t> () { push_back( subject_t( 1, "English")); push_back( subject_t( 2, "Mathematics")); push_back( subject_t( 3, "Physics")); push_back( subject_t( 4, "Biology")); push_back( subject_t( 5, "Chemistry")); push_back( subject_t( 6, "History")); push_back( subject_t( 7, "Geography")); } unsigned max_length() { // Returns length of longest name. unsigned max=0; for (std::vector<subject_t>::const_iterator isubject=begin(); isubject!=end(); ++isubject) { const subject_t& subject = *isubject; if (max < subject.m_subject_name.size()) max = subject.m_subject_name.size(); } return max; } }; struct mark_t { student_t& m_student; subject_t& m_subject; unsigned m_mark; mark_t(student_t& student, subject_t& subject, const unsigned mark): m_student(student), m_subject(subject), m_mark(mark) {} mark_t& operator= (const mark_t& rvalue) { this->m_student = rvalue.m_student; this->m_subject = rvalue.m_subject; this->m_mark = rvalue.m_mark; return *this; } }; struct marks_t : std::vector<mark_t> { students_t& m_students; subjects_t& m_subjects; marks_t (students_t& students, subjects_t& subjects) : std::vector<mark_t>(), m_students(students), m_subjects(subjects) { // pseudo-random number generator std::default_random_engine generator; generator.seed ((unsigned) time (NULL)); std::uniform_int_distribution<unsigned> distribution (0, 100); for (std::vector<student_t>::const_iterator istudent=students.begin(); istudent!=students.end(); ++istudent) { student_t& student = const_cast<student_t&> (*istudent); for (std::vector<subject_t>::const_iterator isubject=subjects.begin(); isubject!=subjects.end(); ++isubject) { subject_t& subject = const_cast<subject_t&> (*isubject); push_back( mark_t(student, subject, distribution(generator))); } } } std::ostream& print (std::ostream& os) { unsigned last_student_id = 0; for (std::vector<mark_t>::const_iterator imark=begin(); imark!=end(); ++imark) { const student_t& student = imark->m_student; if (last_student_id != student.m_student_id) { if (last_student_id) os << '\n'; last_student_id = student.m_student_id; os << '#' << student.m_student_id << '\t' << student.m_student_name << ":\n" << std::endl; } const subject_t& subject = imark->m_subject; os << '\t' << std::setw (m_subjects.max_length()) << subject.m_subject_name << '\t' << std::setw(3) << imark->m_mark << std::endl; } os << std::endl; return os; } }; int main() { students_t students; subjects_t subjects; marks_t marks (students, subjects); marks.print (std::cout); }


Related Questions

How can you tell if it is an original Montague dawson painting or if it is a copy or imposter?

buzzkk@gmail.com


Where is the crescent moon painting by Montague Dawson?

The crescent moon painting by Montague Dawson is currently located at the British National Maritime Museum in Greenwich, London. It is a part of their extensive collection of maritime art.


What is the value of a Montague Dawson painting 1338 eight bells?

What is the value of a Montaque Dawson reproduction Eight Bells


When was Montagu Dawson born?

Montagu Dawson was born in 1919.


When did Montagu Dawson die?

Montagu Dawson died in 2003.


Value of signed Montague dawson print?

signed naval print


Value of a framed signed print of a Montague dawson painting that was published by frost and reed fine art in 1937 in London and framed by Rudolf lesch fine art in New York?

It appears that prints of Dawon are regularly sold at auction for prices between 100 and 1.200 $, see Artvalue.com auctions results (free website): http://www.artvalue.com/result-detail--1585628-Montague-J-Neck-and-Neck-1858-Maritime-25072007.htm http://www.artvalue.com/auction-results--125808------------Montague-J.htm


Who was the original drummer of All Time Low before Rian Dawson?

Rian dawson has been their only drummer


When was Dawson Dawson-Watson born?

Dawson Dawson-Watson was born in 1864.


On dawson's creek James van der beek played dawson what was dawson's last name?

Dawson Leery


What has the author Pam Dawson written?

Pam Dawson has written: 'Creative knitting' 'Monarch Illustrated Guide to Embroidery' 'The Art of Painting on Silk: Vol. 3: Fashions' 'Complete Guide to Crochet' 'Enhancing the abilities of persons with Alzheimer's and related dementias' -- subject(s): Alzheimer's disease, Care, Nursing, Patients, Rehabilitation, Senile dementia 'The Craft of Crochet (The Craftsman's Art Series)' 'El Arte de Pintado Sobre Seda' 'Monarch Illustrated Guide to Knitting' 'The Art of Painting on Silk'


What has the author Rhoda Dawson written?

Rhoda Dawson has written: 'Rhoda Dawson'