COS1511 assignments corrections.docx - COS1511 assignments...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
COS1511 assignments corrections: 2018 56 (assign 1). Which of the following C++ code segments below displays 3(three) lines containing 5 (five) asterisks each 2a (assign 2). Display the output as follows: Please enter the following: Cost per room: 1000 Sales tax per room: 10 The number of rooms: 35 Number of days: 2 The total cost for one room is R1000 The discount per room is 30% The number of rooms booked: 35 The total cost of the rooms over two days is R 49000 The sales tax paid is : 10% The total cost per booking is R53900 Subactivity 17a.i (study guide). A #include statement has been left out in the code on p199 Subactivity 17.a.i.in the Guide In order to use the function rand( ) you have to include the library #include <cstdlib> Please change the program will be as follows: #include <iostream> #include <cstdlib> using namespace std; int main( ) { int r; for (int i = 0; i < 10; i++) { r = rand( );
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
cout << "The number is " << r << endl; } return 0; } Variable diagrams software problems. Some of you experience difficulty with the Variable Diagrams software when trying to run the activities. The application program and activities must be in the
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern