Documents Found!
As seen in
Less Work, Better Grades
Join
Course Hero
Access
best resources
Ace
your classes
Ace your courses with Course Hero!

Submit your homework question or assignment here:
352 Tutors are online
 
We are so confident that you will love our service, we will answer your first homework question for FREE!
*  Attach Assignment (optional):
 
Study Smarter, Score Higher
 
Document Content (unformatted)
Course Hero has millions of student submitted documents similar to the one below including study guides, homework solutions, papers, exam answer keys and textbook solutions.
Assignment Inlab 10 1. Complete the following code: (This program prompts user input a number, an operator(+,-,*,/) and another number, then output the expression and the calculated result.) #include<iostream> using namespace std; int main() { int a, b; char op; cin>>a>>op>>b; switch(op) { case '+' : cout<<a<<op<<b<<'='<<a+b<<endl; break; // complete the other cases: op is '-' or '*' or '/', //do subtraction, multiplication, or division respectively. //Otherwise, output "Bad input" } } 2. Using the Selection Control Structure switch The following uses program if-else structure. Please convert this if-else structure to switch structure without changing the running result. #include<iostream> using namespace std; int main() { int month; cout<<"Please input a number between 1-6: "; cin>>month; if (month==1) cout<< "January" <<endl; else if (month==2) cout<< "February" <<endl; else if (month==3) cout<< "March" <<endl; else if (month==4) cout<< "April" <<endl; else if (month==5) cout<< "May" <<endl; else if (month==6) cout<< "June" <<endl; else cout<<"Bad input!" <<endl; return 0; }
Find millions of documents here - Study Guides, Homework Solutions, Papers, Exam Answer Keys and more. Course Hero has millions of course related materials that will enable you to learn better, faster and get an A in all your courses.
Below is a small sample set of documents:

CUNY Baruch >> CSC >> 126 (Fall, 2009)
Lab 5: InLab Assignment (From Prof. Zelikovitz) I. Write a C+ program that prints out the following banner for CSI: * CCC C C C CCC SSSS S SSSS S SSSS I I I I I SPRING 2009 ** II. Modify your program from Part I, in the following way. A. Instead o...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
Basic Elements of C+ (I) Token The smallest individual unit of a program written in any language is called a token. C+ tokens are divided into special symbols, word symbols, and identifiers. 1. Special Symbols Special symbols include mathematica...
CUNY Baruch >> CSC >> 326 (Fall, 2009)
CSC326 Dr. Sarah Zelikovitz 5/13/2009 1 Case Study Chapter 1 pages 50-57 (C+ plus Data Structures) downloadable from: http:/computerscience.jbpub.com/cppdatastructures/Student_Resources.cfm / header file frac.h class FractionType { public: void In...
CUNY Baruch >> CSC >> 228 (Fall, 2009)
CSC228 Exercises 5 1) Find the prime factorization: a) 88 b) 1001 5/13/2009 2) Which positive integers less than 12 are relatively prime to 12? 3) Are 17,18,19,23 pairwise relatively prime? 4) (Rosen, page 167, #20, modified) A positive integer is ...
CUNY Baruch >> CSC >> 228 (Fall, 2009)
Structures 1) Given the declaration: struct datetype { int month; int day; int year; }; a) What is the output of the following code: datetype birth,current; birth.month = 12; birth.day = 9; birth.year = 1983; cout<setfill(\'0\')<setw(2)<birth.month<\'/\'...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
CSC126 Exam 2/ Page 1 Spring 2007 Dr. Sarah Zelikovitz All answers should be clearly numbered in the blue book only. Calculators and cell phones may not be used during the exam. 1) (20 points) Trace the following two programs: a) What is printed by...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
LAB3 (created by Prof O. D. Gruber) Arithmetic, I/O streams, If-statements, (Case-statements) Project: Create a program which will read the exam scores of students; and then compute their final grade. Specifications: Write a program to perform the ...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
Chapter 6 (page 288 # 6 slightly modified) The following formula gives the distance between two points (x1,y1) and (x2,y2). ( x2 - x1 ) 2 + ( y 2 - y1 ) 2 If one of the points corresponds to the center point of a circle, and the other point corresp...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
QUIZ #2: NAME: 1. Trace the following program: #include<iostream> using namespace std; int main() { int num; int a,b,c = 1; char ch = \';\'; char junk = \')\'; num = 15; a = 0; b = a; cout<\"\\t\\tSIDEWAYS FACES\ \"; cout<\"WINK:\ \"; cout<b<\" \"<c<\" \"<a<\'\\t\'...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
CSC126 Exam 2/ Page 1 ANSWERS ARE IN RED INK BELOW EACH QUESTION: Spring 2007 Dr. Sarah Zelikovitz All answers should be clearly numbered in the blue book only. Calculators and cell phones may not be used during the exam. 1) (20 points) Trace the f...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
HOMEWORK # 1 1) Which of the following are illegal identifier names, and why? a) b) c) d) e) f) g) h) i) hello int good-bye why_dont_you_continue 1outOfFive payRate x gr8 hi! 2) What is printed by the following program? #include<iostream> using name...
CUNY Baruch >> CSC >> 126 (Fall, 2009)
Quiz # 1 1. What is printed by the following program? Show the output screen. #include<iostream> using namespace std; int main() { int counter = 0; int number; char eyes = \':\'; cout<\"counter is currently: \" < counter < endl; counter+; cout < eyes < \'...
CUNY Baruch >> CSC >> 228 (Fall, 2009)
prerequisite co-requisite course credit permission fulfill description catalog requirement identified ...
CUNY Baruch >> CSC >> 326 (Fall, 2009)
10 230 100 8 206 120 7 111 50 3 159 56 9 336 200 1 51 10 10 250 123 4 101 29 9 341 190 2 105 43 8 256 122 10 320 120 3 150 19 5 215 98 7 222 108 9 400 210 10 330 125...
CUNY Baruch >> CSC >> 332 (Fall, 2009)
0 95 20 63 45 88 47 93 63 98 72 197 74 153 82 68 101 50 122 59 156 52 166 16 185 67 195 111 224 36 236 48 246 54 255 17 278 52 284 96 291 90 321 63 342 65 370 44 404 57 425 3 429 74 448 94 469 77 476 55 490 174 495 86 519 64 538 161 545 94 552 165 56...
CUNY Baruch >> CS >> 430 (Fall, 2009)
135 Appendix A Data Management Using Files Visual Basic.Net 2/e Multiple Choice 1. The correct syntax to open a file named students.txt in your C:\\temp folder for write access is: a) b) c) d) FileOpen(1, \"C:\\temp\\students.txt\",OpenMode.Output). Op...
CUNY Baruch >> LOANCALCUL >> 430 (Fall, 2009)
CSc 430 Software Engineering Professor Domanski Lab 1 Simple GUI Loan Calculator All programs must have your name, and lab number on them; in additions, all programs must be commented (you don\'t have to go crazy, but the comments should explain en...
CUNY Baruch >> CS >> 430 (Fall, 2009)
31 Chapter 4 Data, Operations, and Built-In Functions Visual Basic.Net 2/e Multiple Choice 1. Text enclosed in a pair of quotation marks is a _ data type: a) b) c) d) integer long string variable X Section Reference: Section 4.1 Answer: 2. A mem...
CUNY Baruch >> CS >> 430 (Fall, 2009)
66 Chapter 8 Arrays and Their Uses Visual Basic.Net 2/e Multiple Choice 1. A variable that holds one value, such as a number or a string is a(n): a) b) c) d) array variable. scalar variable. constant. singular variable. X Section Reference: Introd...
CUNY Baruch >> CS >> 430 (Fall, 2009)
31 Chapter 4 Data, Operations, and Built-In Functions Visual Basic.Net 2/e Multiple Choice 1. Text enclosed in a pair of quotation marks is a _ data type: a) b) c) d) integer long string variable C Section Reference: Section 4.1 Answer: 2. A mem...
CUNY Baruch >> CS >> 430 (Fall, 2009)
Lab 1 CSc 430 Prof Domanski Memory Game The objective of this program is to introduce you to simple GUI concepts. You\'ll extend this program in lab 2 by adding several new functions. Here, the concepts to understand are command buttons and th...
CUNY Baruch >> CS >> 430 (Fall, 2009)
Lab 2 CSc 430 Prof Domanski Memory Game Extensions The objective of this lab is to extend the operation of the program. You\'ll be adding a timer that controls how long the player gets to study the \'board\' before the values disappear. This timer...
CUNY Baruch >> CS >> 430 (Fall, 2009)
59 Chapter 7 Repetition Visual Basic.Net 2/e Multiple Choice 1. The keyword that marks the end of a Do structure is: a) b) c) d) End Do. Loop. For Next. End While X Section Reference: Section 7.1 Answer: 2. Given the structure Do While X > 1000 ...
CUNY Baruch >> CS >> 430 (Fall, 2009)
CSc 430 - Prof Domanski - Lab 3 - Survey Maker/Taker In this lab assignment, you\'ll create a program that lets you In this lab assignment, you\'ll create a program that lets you take and then evaluate the results of a survey. This program will require...
CUNY Baruch >> CS >> 430 (Fall, 2009)
48 Chapter 6 Input, Output and Procedures Visual Basic.Net 2/e Multiple Choice 1. The process of obtaining data from a source external to the CPU is: a) b) c) d) a Sub procedure. input. a Function procedure. output. X Section Reference: Section 6....
CUNY Baruch >> CS >> 430 (Fall, 2009)
CSc 430 Software Eng\'ng/Adv GUI Pgmg Lab #4 Prof. Domanski Objective To create a generic line graph with the following properties: read data from a file (e.g. 430data.dat) allow the user to choose the starting and ending values of the X a...
Glasgow Caledonian University >> EE >> 133 (Fall, 2009)
EE-133 Matlab Code: HW11 James Pringle img=(imread(\'lab6.jpg\'); imshow(img); figure(2); F=fft2(img); X=uint8(F); imshow(X); [w,h]=size(img); d=double(img); for x=1:1:w; for y=1:1:h; Z(x,y)=d(x,y)*(1)^(x+y); end; end; F2=fft2(Z); X=uint8(...
Glasgow Caledonian University >> EE >> 128 (Fall, 2009)
RLIMIT_CORE 3145728 (infinite) RLIMIT_CPU (infinite) (infinite) RLIMIT_DATA (infinite) (infinite) RLIMIT_FSIZE (infinite) (infinite) RLIMIT_NOFILE 256 65536 RLIMIT_STACK 8388608 (infinite) RLIMIT_VMEM ...
Glasgow Caledonian University >> CD >> 173 (Fall, 2009)
Cell Growth Chart 60 0 55 0 50 0 45 0 40 0 Number of Cells 35 0 30 0 25 0 20 0 15 0 14 0 13 0 12 0 11 0 10 0 90 80 70 60 50 40 30 20 10 1 2 3 4 5 6 7 8 9 10 11 12 Create a bar chart that shows the number of cells for each gener...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Loading ~/ee103/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. Loading ~/.simrc file. *Error* load: can\'t access file - \"~/...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:22:53 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"16bitComparator\" view name = \"extra...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:19:00 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"8bitCounter\" view name = \"extracted...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:42:58 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"NOR2\" view name = \"extracted\" glob...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:45:34 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"XNOR2\" view name = \"extracted\" glo...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:37:42 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"DFFxPRxCLR\" view name = \"extracted\"...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:44:47 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"Or16\" view name = \"extracted\" glob...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:20:56 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"8bitRegisterxPRxCLR\" view name = \"e...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:42:06 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"NAND3\" view name = \"extracted\" glo...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:16:35 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"8bitAdder\" view name = \"extracted\" ...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:47:40 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"inverter\" view name = \"extracted\" ...
Glasgow Caledonian University >> EE >> 103 (Fall, 2008)
Running simulation in directory: \"/ece/ugrad/swarre02/ee103/LVS\". Begin netlist: Nov 30 15:40:24 2006 view name list = (\"auLvs\" \"extracted\") stop name list = (\"auLvs\") library name = \"ee103\" cell name = \"N3OR\" view name = \"extracted\" glob...
Glasgow Caledonian University >> CD >> 143 (Fall, 2009)
Sara Fuentes November 13, 2003 Robolab Project: The Family Room Family. It was one of the first words to pop into my head as I was trying to think of possible layouts for my Robolab Project. It topped both my mental and written lists of the most impo...
Glasgow Caledonian University >> CD >> 145 (Fall, 2008)
Joye Thaller CD 145 Logo Summary March 2, 2005 I found this project to be very frustrating. I am surprised that this program is used with young children because I found it very difficult to use. I ended up doing a program based on the commands I co...
Glasgow Caledonian University >> CD >> 145 (Fall, 2008)
Morgan Hynes 3.3.05 Logo programming assignment Click here to play the Buzz Game During this assignment, I found myself using the help quite often. I have never used this programming language and need lots of help to figure out what commands I could ...
Wisc Eau Claire >> ANTH >> 161 (Fall, 2009)
1 Ethnicity and Race Ethnic Groups and Ethnicity Race The Social Construction of Race Stratification and \"Intelligence\" Ethnic Groups, Nations, and Nationalities Peaceful Coexistence Roots of Ethnic Conflict 2008 The McGraw-Hill Companies, In...
Wisc Eau Claire >> ANTH >> 161 (Fall, 2009)
Great American Smoke Out Thursday November 20th 11:00 am 2:00 pm Campus Mall Come get all the facts to quit smoking and help others on their journey! University of Wisconsin - Eau Claire Colleges Against Cancer 2 Religion What Is Religion? O...
Wisc Eau Claire >> ANTH >> 161 (Fall, 2009)
1 Colonialism and Development Colonialism Development Development Anthropology Strategies for Innovation 2008 The McGraw-Hill Companies, Inc. All rights reserved. 2008 The McGrawHill Companies, Inc. 2 Colonialism Imperialism policy of exte...
Wisc Eau Claire >> ANTH >> 161 (Fall, 2009)
1 Families, Kinship, and Descent Families Descent Kinship Calculation Kinship Terminology 2008 The McGraw-Hill Companies, Inc. All rights reserved. 2008 The McGrawHill Companies, Inc. 2 Families Understanding kinship system is essential par...
Wisc Eau Claire >> ANTH >> 161 (Fall, 2009)
1 Marriage What Is Marriage? Incest and Exogamy Explaining the Taboo Endogamy Marital Rights and Same-Sex Marriage Marriage As a Group Alliance Divorce Plural Marriages 2008 The McGraw-Hill Companies, Inc. All rights reserved. 2008 The McGr...
Wisc Eau Claire >> EDMT >> 380 (Fall, 2009)
STUDENT ACTIVITY PAGE NAME_ DATE_ PRACTICE MAP ALL CLICKS ARE \"SINGLE CLICK\" UNLESS NOTED AS \"DOUBLE \"CLICK.\" \"Turn on/off\" = click one time in the check box to the left of the theme name, making a check mark appear/disappear, so the theme displays...
Binghamton >> CS >> 495 (Fall, 2009)
The Social Implications of Computing \"The most profound technologies are those that disappear. They weave themselves into the fabric of everyday life until they are indistinguishable from it.\" -Mark Weiser, Xerox PARC Computer Contributions to S...
Binghamton >> CS >> 495 (Fall, 2009)
Professional and Ethical Responsibilities The Nature of Professionalism Dave Isenberg What is professionalism? -The following of a profession, sport, etc., as an occupation; -Webster\'s Dictionary -The expertness characteristic of a professional per...
Binghamton >> CS >> 455 (Fall, 2009)
Hackers, Crackers, and Network Intruders CS-480b Dick Steflik Agenda Hackers and their vocabulary Threats and risks Types of hackers Gaining access Intrusion detection and prevention Legal and ethical issues Hacker Terms Hacking - showi...
Binghamton >> CS >> 328 (Fall, 2009)
Directory & Naming Services CS-328 Dick Steflik A Directory Directory Services Services provided by special network databases that map names to addresses Same idea as a telephone directory unique key (name) set of attributes (name value pairs) ...
Binghamton >> CS >> 495 (Fall, 2009)
Public Speaking CS-495 Public Speaking \"Talk is cheap\" Not anymore, a well organized, thoughtful talk makes many people a very lucrative wage Henry Kissinger Barbara Walters Colin Powell Speaking Opportunities At work Selling your ideas Technica...
Binghamton >> CS >> 455 (Fall, 2009)
Authentication Applications We cannot enter into alliance with neighbouring princes until we are acquainted with their designs. -The Art of War, Sun Tzu Authentication Applications will consider authentication functions developed to support...
Binghamton >> CS >> 328 (Fall, 2009)
Java RMI CS328 Internet Programming In the Good Old Days. Only local objects existed My Machine My Object Today\'s World. Network and Distributed Objects My Machine Local Objects Remote Machine Remote Objects Why not just use sockets? socke...
Binghamton >> CS >> 455 (Fall, 2009)
Scanning CS-480b Dick Steflik What Can We Scan For Modems (and other telephone devices) Live Hosts TCP ports UDP ports Promiscuous NICs Modems Repeatedly dial phone numbers looking for a modem to answer or other things War Dialers used to f...
Binghamton >> CS >> 328 (Fall, 2009)
Java Messaging Services CS-328 Messaging Systems A messaging System allows and promotes the loose coupling of components allows components to post messages for other components asynchronous rather than synchronous also known as MOM (Message-Orie...
Binghamton >> CS >> 240 (Fall, 2009)
Sorting CS-240 & CS-341 Dick Steflik Exchange Sorting Method : make n-1 passes across the data, on each pass compare adjacent items, swapping as necessary (n-1 compares) O(n2) Exchange Sorting Basic Algorithm ( no improvements) int ExchangeSort (...
Binghamton >> CS >> 328 (Fall, 2009)
File Transfer Protocol CS-328 Dick Steflik FTP RFC 959 uses two TCP Ports one for control one for data transfers command-response protocol control port uses telnet protocol to negotiate session US-ASCII <crlf> is end-of-line character Acti...
Binghamton >> CS >> 495 (Fall, 2009)
Project: The Watson Game Function: (Client, Server, Database) Subsystem: Author: Date: Class: CS-495 Spring 2005 Project: The Watson Game Function: Subsystem: Author: Joe Student Date:04/26/2004 1 Introduction..3 1.1 Goals and objectives.3 1.2 Sta...
Binghamton >> CS >> 422 (Fall, 2009)
YEA! Program Requirements Document Table of Contents 1. Introduction .1 2. Program Access and Control ..1 2.1 View/Search .1 2.2 Modify ..1 3. Entrance Page .2 4. Submit an Award ..3 5. Recipient Selection of Award .4 6. Reports ..5 7. Administrato...
Binghamton >> CS >> 495 (Fall, 2009)
CS-495b Senior Seminar Speaker: Topic: Main Points: Name: Speaker: Topic: Main Points Speaker: Topic: Main Points: Speaker: Topic: Main Points: Speaker: Topic: Main Points: ...
Binghamton >> CS >> 495 (Fall, 2009)
The Watson Adventure Game 2004 CS-495 Fall 2003 Experimented with Client Server version Static Pictures of parts of the building NSEW navigation Panoramic 3-views of building intersection Confused user Good attempt but abandoned Spring 2004 ...
Binghamton >> CS >> 495 (Fall, 2009)
CS 495b Client Group User Interface Jesse Jenifer s Graphics Handling Matt Yourst s Protocol Handling Brian Boyd s Client Design Seth Levenberg s In Depth Design Lee Duvall s Soundtrack and Audio Daniel Baxter s User Interface Jesse Jenifer U...
Binghamton >> CS >> 495 (Fall, 2009)
The Server Group CS 495 Professor Steflik Fall 2004 Victoria Toujilina Ryan Leslie Justin Phillips Qing Zhang Yu Ting Oren Kashi Mark Bojdak Farshid Firouzeh Leonard Wong Brian Juba Server Integration Responsibility Victoria Toujilina ...
Binghamton >> CS >> 495 (Fall, 2009)
The Database Group David Hockenberry Brian Ge Paul Juckiewicz Logan Everett Laurel Andersen Di Zhang Overall Database Responsibility (Migration from Access to MySQL) By David Hockenberry Responsibilities Migration from Access to MySQL Preserv...
Binghamton >> CS >> 495 (Fall, 2009)
The Social Context of Computing Group 1 The Social Context of Computing Kyle Lippencott Introduction to the Social Implications of computing Laura Thurber Social Implications of Networked Communications Douglas Camin Growth of, Control of and A...
Binghamton >> CS >> 495 (Fall, 2009)
Professional and Ethical Responsibilities Mathew Laba Shengsheng Liu Johnny Loi Bedros Magardichian CS 495 Senior Seminar Spring 2004 Group 2 Adam Marczyk The Nature of Professionalism Mathew Laba CS 495: Senior Seminar Professor Steflik Spri...
What are you waiting for?