Free Essay

Input and Output Stream

In: Science

Submitted By nimal9042
Words 256
Pages 2
Tutorial 2: Exercise on Input and Output Stream 1. Write a C++ program to display the following output on the screen using multiple cout statements.

2. Write a C++ program to display the following output using only one cout statement.

3. Write the output of the following program.

#include <iostream> using namespace std;

int main ()
{
int number1 = 45; float number2 = 75.25; cout<<"The Value of number1 = "<<number1; cout<<" The Value of number2 = "<<number2;
}

4. Write the output of the following program.
#include <iostream> using namespace std;

int main ()
{
int number1 = 45; float number2 = 75.25; cout<<"The Value of number1 = "<<number1<<" The Value of number2 = "<<number2;
}

5. Write a C++ program to input two integer numbers from the keyboard. Extract the two integer numbers by using two separate cin statements and display the numbers on the screen.

6. Modify the above program to extract the two integer numbers by using only one cin statement and display the numbers of the screen.

7. Write a C++ program that accepts your first name and the second name and display the full name on the screen.

8. Write a C++ program that accepts the following line and text and display the line on the screen.
“This is my second tutorial class of CPT111”

9. Write a C++ program to accept 000015 from the keyboard and convert the string to an integer and display the integer on the screeInput

Similar Documents

Free Essay

Bt0064 Smu Bsc It - Digital Logic

...With the gate shown to the left, both inputs must have logic 1 signals applied to them in order for the output to be a logic 1. With either input at logic 0, the output will be held to logic 0.If your browser supports the Javascript functions required for the demonstrations built into this page, you can click the buttons to the left of the AND gate drawing to change their assigned logic values, and the drawing will change to reflect the new input states. Other demonstrations on these pages will work the same way.There is no limit to the number of inputs that may be applied to an AND function, so there is no functional limit to the number of inputs an AND gate may have. However, for practical reasons, commercial AND gates are most commonly manufactured with 2, 3, or 4 inputs. A standard Integrated Circuit (IC) package contains 14 or 16 pins, for practical size and handling. A standard 14-pin package can contain four 2-input gates, three 3-input gates, or two 4-input gates, and still have room for two pins for power supply...

Words: 1845 - Pages: 8

Free Essay

Mmmmm

...Jaipur Engineering College & Research Centre, Jaipur Manual Of TCP/IP Programming Lab (7CP8) Session 2007-2008 Computer Engineering Department Prepared By: Mahesh Jangid cc Exercise No. 1 AIM: Study of Data Communication System, Connectionless and connection oriented service, programming with TCP and UDP. Theory: - [pic] Networking Basics • computers running on the Internet communicate to each other using either Transmission Control (TCP) or the User Datagram (UDP) protocol • when we write Java programs that communicate over the network, we are programming at the application layer • however, to decide which Java classes our programs should use, we need to understand how TCP and UDP differ UDP (User Datagram Protocol) • connectionless - sends independent packets of data, called datagram, from one computer to another with no guarantees about arrival • each time a datagram is sent, the local and receiving socket address need to be sent as well TCP (Transmission Control Protocol) • connection-oriented - provides a reliable flow of data between two computers _ data sent from one end of the connection gets to the other end in the same order • in order to communicate using TCP protocol, a connection must first be established between the pair of sockets • once two sockets have been connected, they can be used to transmit data in both (or either one of the) directions UDP vs. TCP: Which......

Words: 2326 - Pages: 10

Free Essay

Modflow

...of their input unit numbers; • Specifying initial and boundary conditions, and • Discretization of time....

Words: 1870 - Pages: 8

Free Essay

Voice Chat System

...Voice Chat & Video Conferencing INDEX Title of Project……………………………………………………. i Certificate………………………………………………………… ii Acknowledgements……………………………………………… iii 1 Introduction 2 Design & Implementation 2.1 Why Java Platform 2.2 Java Media Framework Streaming Media Architecture Presentation Processing Capture Media Data Storage & Transmission 2.3 Real-time Transport Protocol Streaming Media RTP Architecture RTP Application 2.4 JMF RTP Application Programming Interface RTP API Architecture Reception Transmission 2.5 Requirements & Specification Feasibility Analysis Requirements Functionality Specification 2.6 Diagrams 3 Results 3.1 Snapshots 3.2 Future Offshoots 3.3 Conclusion References CHAPTER 1 INTRODUCTION Introduction To sum up, the at most priority must be given to the definition of the problem statement of the project to be undertaken. So the project is a set of file related with each other developed by the creators of the system to accomplish a specific purpose. Our purpose is to design project for “VOICE CHATTING & VIDEO CONFERENCING”. As the name suggests, our project is based on audio/video transmission & reception. Through our application two or more persons in an intranet can Chat with one another & they can have Video......

Words: 5465 - Pages: 22

Free Essay

Java Programming

...A Programmer’s Guide to Java™ SCJP Certification Third Edition This page intentionally left blank A Programmer’s Guide to Java™ SCJP Certification A Comprehensive Primer Third Edition Khalid A. Mughal Rolf W. Rasmussen Upper Saddle River, New Jersey • Boston • Indianapolis • San Francisco New York • Toronto • Montreal • London • Munich • Paris • Madrid Capetown • Sidney • Tokyo • Singapore • Mexico City Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals. The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact: U.S. Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com For sales outside the......

Words: 15086 - Pages: 61

Premium Essay

Lean Six Sigma

...Lean Six Sigma Notes Lean ­ cuts down on waste, reduce cycle times Six sigma ­ reduces variation in a process DMAIC: define, measure, analyze, improve, and control define ­ identify project, capture VOC and VOB  measure ­ baseline data metric is critical  analyze ­ find the root cause of your problem (may be many but find the  significant 1, 2, and 3 root causes affecting this project), validate critical  Xs, what really affects the output of the process ­ value added vs non  value added improve ­ develop solution and test solution (pilot/pilot plan) control ­ implement policies and procedures (SOPs) to sustain improvements Process: activity that produces something (information, items, ideas, or notions) for a  customer ­ concerned with quality, cost, or speed value stream = process  value stream map = a process map with raw data on it Project Charter ­ contract between you and the sponsor  ­update this during every phase in DMAIC 1) Draft Problem Statement = Pain of Customer  2) Drafting Goal Statement 3) Complete project scope 4) Draft business impact 5) Project plan 6) Team Selection 7) Signatures (optional) RACI chart (Responsible ­ Commanders, Accountable ­ Staff, Consulted ­ SEM,  Informed)  Project sponsors ­ typically the process owners  Opportunity or problem statement ­ what pain are we feeling? what are they  complaining about? what is not working? Problem should never have the solution in it?  Project scope ­ what authorities do you have? ...

Words: 471 - Pages: 2

Free Essay

Value Stream Mapping

...Prod’n  m/c Material cart Q QS Material distance  = 1,230 M QC distance  =    400 M Production Area Lead time =    5 days SIPOC Diagram Suppliers Inputs Process Outputs Customers •External External •Internal •Materials Materials •Services •Information Process •Materials Materials •Services •Information •External External •Internal Step 1 Step 2 Step 3 Step 4 Step 5 • A simple form of process map used to get an overview of a process • Can be seen as a cell of a larger map Process Mapping The map lists every step that is involved in the delivery...

Words: 2770 - Pages: 12

Premium Essay

Market Strategies

...Identify all the steps in the value stream for each product family, eliminating whenever possible those steps that do not create value. 3. Make the value-creating steps occur in tight sequence so the product will flow smoothly toward the customer. 4. As flow is introduced, let customers pull value from the next upstream activity. 5. As value is specified, value streams are identified, wasted steps are removed, and flow and pull are introduced, begin the process again and continue it until a state of perfection is reached in which perfect value is created with no waste.   KAIZEN What is Kaizen? Kaizen is the practice of continuous improvement. Kaizen was originally introduced to the West by Masaaki Imai in his book Kaizen: The Key to Japan’s Competitive Success in 1986. Today kaizen is recognized worldwide as an important pillar of an organization’s long-term competitive strategy. Kaizen is continuous improvement that is based on certain guiding principles: * Good processes bring good results * Go see for yourself to grasp the current situation * Speak with data, manage by facts * Take action to contain and correct root causes of problems * Work as a team * Kaizen is everybody’s business * And much more! One of the most notable features of kaizen is that big results come from many small changes accumulated over time. However this has been misunderstood to mean that kaizen equals small changes....

Words: 1126 - Pages: 5

Free Essay

Lua Stuff

.... Introduction top next gema actions are enough for everyday usage but occasionally you may need more power to define a complex transformation. You might, also, want to use the superior matching capabilities of gema to drive your program. GeL is a Lua 5 library that: allows the execution of Lua function (and hence of a C function) in a gema action provides the powerful text matching mechanisms offered by gema as a set of Lua functions it has been tested with Lua 5.0.2. Refer to the detailed documentation to build gel togheter with gema, . 1.1 Status GeL is not as mature as gema or Lua, please report any bugs you may find using SourceForge bug tracking subsystem (you don't need to log in as a SourceForge user) or sending an e-mail to Remo Dentato. 1.2 Licence GeL is released under the same licence of Gema. No specific reference needs to be made to GeL as long as the due reference to Gema and Lua have been made. 2. Usage prev top next 2.1 Gema like Gel may be used exactly as if it was gema, any valid gema script should work when executed by gel: gel [gemaopts] [-f rules.gema] [-l script.lua] [infile [outfile]] . The only differences are: The @lua{} function is available to execute lua scripts in actions Text enclosed between "![" and "!]" is considered lua code and is immediately executed Rules specfied with '-f' are loaded, the lua script specified with '-l' is executed (possibily defining lua......

Words: 1294 - Pages: 6

Free Essay

Light Tree

...LIGHT TREE A SEMINAR REPORT Submitted By SUJIT KUMAR In partial fulfillment of the award of the degree of BACHELOR OF TECHNOLOGY IN COMPUTER SCIENCE AND ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE & TECHNOLOGY KOCHI-682022 SEPTEMBER 2008 DIVISION OF COMPUTER SCIENCE AND ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE & TECHNOLOGY, COCHIN-682022 Certificate Certified that this is a bonafide record of the Seminar Entitled “Light Tree” Done by the following Student Sujit Kumar Of the VIIth semester, Computer Science and Engineering in the year 2008 in partial fulfillment of the requirements to the award of Degree Of Bachelor Of Technology in Computer Science and Engineering of Cochin University of Science and Technology. Ms. Sheena S. Dr. David Peter Seminar Guide Date: Head of Department ACKNOWLEDGEMENT At the outset, I thank the Lord Almighty for the grace, strength and hope to make my endeavor a success. I also express my gratitude to Dr. David Peter, Head of the Department and my Seminar Guide for providing me with adequate facilities, ways and means by which I was able to complete this seminar. I express my sincere gratitude to him for his constant support and valuable suggestions without which the successful completion of this seminar would not have been possible. I thank Ms. Sheena S, my seminar guide for her boundless cooperation and helps extended for this seminar. I express my immense......

Words: 5142 - Pages: 21

Premium Essay

Geography

...HYDROLOGY – “THE STUDY OF WATER” A stream is a flow of running water, large or small, whereas a river is a large stream of water. Both are integral parts of the hydrological cycle – their main function is to transport water from the land to the sea. Hydrological cycle – it is another term for the water cycle. Precipitation – It’s the type, total amount and intensity of precipitation are key factors in determining the nature of water movement Interception – Vegetation intercepts some precipitation on its way to the ground, water is lost back into the atmosphere by evapotranspiration. Intercepting plants use water for growth and vegetation reduces and slows down water transfer. Infiltration - It involves water moving from the ground surface into the soil, the rate of this depends on moisture content of the soil and its porosity. Evaporation – It’s when water is loss from the ground surface into the atmosphere Overland flow – It’s a rapid form of water transfer over the surface of the ground, it’s likely to happen during periods of heavy rainfall or when the soil has become completely saturated. Evapo-transpiration – It’s when water is loss from the ground surface to the atmosphere, combines with water given off from plants to form the main output from the system. Through-flow – The downhill transfer of water through the soil layer to the river, this shallow transfer can be quite rapid in very porous sandy soils....

Words: 536 - Pages: 3

Free Essay

Term Paper on Microprocessor Systems

...Number of digital inputs: 8. 6. Number of digital outputs: 8. 7. Interrupt controller, with a fixed order of service. 8. DMA channel. 9. Serial channel. 10. Timer / counter. Content Introduction 1. The description of applied elements 2.1 Microprocessor KR580VM80A 2.2 Oscillator of clock pulses KP580ГФ2 2.3 Control unit of interruptions KP580BH5 2.4 System control unit KR580VK28 2.5 Programmed consecutive interface KR580VV51 2.6 Control unit of the keyboard and display KR580VV79 2.7 Microcircuit of random-access memory K537PУ17 2.8 Microcircuit of ROM K573PФ6 2.9 Microcircuit of decoder K155ID3 2.10 Microcircuit K514ИД2 2.11 Buffer register 1533АП5 2. Calculation part 3.12 Calculation and planning of address space of memory 3.13 Construction of circuit designs of decoding of addresses of memory 3.14 Calculation and planning address for input-output devices 3.15 Construction of circuit designs of decoding of addresses of input-output devices 3. The block diagram 4. A circuit diagram Conclusion Reference list Introduction In the given academic year project the microprocessor complete set of series KP580 is observed. This set of microcircuits, is analogous to a set of microcireuits Intel 82xx. Represents a 8-digit complete set on a basis n-МОП production engineering....

Words: 3184 - Pages: 13

Premium Essay

Current Business Practice Audit

...Riordan Current Business Practices Audit MGT/360 University of Phoenix Riordan Current Business Practices Audit Riordan Manufacturing is a global plastics manufacturer with locations in California, Georgia, Michigan, and China. The vice president of operations decided to develop a sustainability plan. Team A has been assigned the task to conduct a business audit to evaluate the Riordan’s current business practices at each location. The audit provides valuable information to identify the nonsustainable business practices and how each effects the environment. The subject in this paper is how Riordan Manufacturing will identify their nonsustainable practices, federal regulations, mandatory, and voluntary actions necessary to implement a successful sustainability plan. Nonsustainable Business Practices The business practice audits brought to light three nonsustainable practices. The three practices highlighted by the audit include wasted energy from the plants, the use of toxic cleaning solvents, and spilled ink. These three business practices can be very harmful to the environment. Burning fossil fuels for energy creates gases such as sulfur dioxide, nitrogen oxide, and volatile organic compounds. These gases cause air pollution. They can cause several kinds of air pollution, particular matter, smog, and ozone (New Energy Alternative, 2008). Air pollution can travel thousands of miles and can harm areas that burn fossil fuels sparingly. The next......

Words: 6823 - Pages: 28

Free Essay

Android

...The earliest and still most common form of compiler-compiler is a parser generator, whose input is a grammar (usually in BNF) of a programming language, and whose generated output is the source code of a parser often used as a component of a compiler. Similarly, code generator-generators (such as J Burg) exist, but such tools have not yet reached maturity. The ideal compiler-compiler takes a description of a programming language and a target instruction set architecture, and automatically generates a usable compiler from them. In practice, the state of the art has yet to reach this degree of sophistication and most compiler generators are not capable of handling semantic or target architecture information. History The first compiler-compiler to use that name was written by Tony Brooker in 1960 and was used to create compilers for the Atlas computer at the University of Manchester, including the Atlas Auto code compiler. However it was rather different from modern compiler-compilers, and today would probably be described as being somewhere between a highly customizable generic compiler and an extensible-syntax language. The name 'compiler-compiler' was far more appropriate for Brooker's system than it is for most modern compiler-compilers, which are more accurately described as parser generators. It is almost certain that the "Compiler Compiler"...

Words: 2951 - Pages: 12

Free Essay

Hostel Management

...------------------------------------------------- Data compression From Wikipedia, the free encyclopedia   (Redirected from Video compression) "Source coding" redirects here. For the term in computer programming, see Source code. In digital signal processing, data compression, source coding,[1] or bit-rate reduction involves encoding information using fewer bits than the original representation.[2]Compression can be either lossy or lossless. Lossless compression reduces bits by identifying and eliminating statistical redundancy. No information is lost in lossless compression. Lossy compression reduces bits by identifying unnecessary information and removing it.[3] The process of reducing the size of a data file is referred to as data compression. In the context of data transmission, it is called source coding (encoding done at the source of the data before it is stored or transmitted) in opposition to channel coding.[4] Compression is useful because it helps reduce resource usage, such as data storage space or transmission capacity. Because compressed data must be decompressed to use, this extra processing imposes computational or other costs through decompression; this situation is far from being a free lunch. Data compression is subject to a space–time complexity trade-off. For instance, a compression scheme for video may require expensive hardware for the video to be decompressed fast enough to be viewed as it is being decompressed, and the option to decompress the......

Words: 12347 - Pages: 50