lect15 Project and Final

lect15 Project and Final - #include <iostream> / WHAT...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> // WHAT IS THE OUTPUT OF THIS PROGRAM??? #include <vector> using namespace std; int main() { vector<char> output(16, 'F');int values[] = {4,5,7,9,10,23,13};int i; if (values[1] == 5) output[1] = 'o'; else output[1] = 'y'; if (values[0] > values[2]) output[0] = output[2] = 'e'; else {output[0] = 'n';output[2] = output[8] = ' ';} while (values[4] < values[3]) { output[values[3]] = 'l';values[3]++; } output[3] = 'c';output[5] = output[13] = 'a'; if (values[6] % 7 == 6) { output[4] = 'l';output[6] = output[7] = 's';output[10] = 'r'; output[11] = 'i';output[12] = 'd';output[14] = 'y';output[15] = '\0'; } for(i = 0; i < output.size();i++) cout << output[i]; cout << "!!!!!" << endl; return (0); }
Background image of page 1

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

View Full DocumentRight Arrow Icon
Upcoming Events Final Exam Times: Mon 10:00 Class: TBD Mon 11:25 Class: TBD Wed 6:25 Class: TBD Changes: Send email to hanrath@iit.edu NO LATE OR MAKEUP EXAMS GIVEN!!!
Background image of page 2
Project Project Due Wednesday 12/10 at Noon CST Turn in to TA (email or Floppy)
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

lect15 Project and Final - #include &lt;iostream&gt; / WHAT...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online