TWiki> CS107 Web>PuTTY (2015-06-18, Main.yliu222)
/* Lab Assignment 1 for CS 107 - Summer 2015

*

* Written by Ying Liu - 6/18/15

*

* This program is to print some information regarding the St. Ives rhyme

* Complete information on the requirements of this assignment can be

*/

#include <iostream>

using namespace std;

int main()

{

// Print information about the author

cout << "Author: Ying Liu" << endl;

cout << "UIN: 662687432" << endl;

cout << "CS 107 - Summer 2015" << endl;

cout << "Lab Assignment 1" << endl;

cout << "Lab Time: Wednesday at 10am" << endl;

// set up the variables for the St. Ives Rhyme

int numMan;

int numWives;

int numSacks;

int numCats;

int numKits;

int numLivingthings;

// calculate the vaules for each variable

numMan = 1;

numWives = numMan * 7;

numSacks = numWives*7;

numCats = numSacks*7;

numKits = numCats*7;

numLivingthings = numMan+numWives+numCats+numKits;

// Print out the information for the St. Ives

cout << endl;

cout << "Print the St. Ives Rhyme information" << endl;

cout << " The number of men met are: " << numMan << endl;

cout << " The number of wives met are: " << numWives << endl;

cout << " The number of sacks met are: " << numSacks << endl;

cout << " The number of cats met are: " << numCats << endl;

cout << " The number of kits met are: " << numKits << endl;

cout << " The number of living things met are: " << numLivingthings << endl;

// end the program execution

return 0;

}

Topic revision: r1 - 2015-06-18 - 21:38:21 - Main.yliu222

 Copyright 2016 The Board of Trustees of the University of Illinois.webmaster@cs.uic.edu WISESTHelping Women Faculty AdvanceFunded by NSF  