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

Premium Essay

Input and Output Devices

...attached t the window. This will appear the with the menu list of the printers you will be able to print from. In a Linux operating system like Ubuntu, you can see the printers that are installed in it by, opening the Gnome cups manager. This is done by clicking on system, going to administration, there you will double click on “printing menu”. A box will appear and there you will be able to see the printers that are already installed or if you wish to add another printer you can, by just double clicking on the “add a printer” tab. In conclusion different operating systems have different ways to operate some are more user friendly some are more complicated. One thing that they all have in common is the fact that you will always have the input and output devices....

Words: 542 - Pages: 3

Free Essay

Indian Streams Research Journals

...Indian Streams Research Journal Vol.2,Issue.IV/May; 12pp.1-4 Prof. N. G. Alvi Research Papers ISSN:-2230-7850 “Dynamic Load and Stress Analysis of a Crankshaft” Dr. S. V. Deshmukh Prof.& Head, Bapurao Deshmukh College of Engineering, Sevagram, Wardha, India Ram.R.Wayzode Lecturer, Suryodaya College of Engineering & Technology, Nagpur, India Prof. N. G. Alvi Prof,Suryodaya College of Engineering & Technology, Nagpur,India ABSTRACT In this study a dynamic simulation was conducted on a crankshaft from a single cylinder four stroke engine. Finite element analysis was performed to obtain the variation of stress magnitude at critical locations. The pressure-volume diagram was used to calculate the load boundary condition in dynamic simulation model, and other simulation inputs were taken from the engine specification chart. The dynamic analysis was done analytically and was verified by simulation in ADAMS which resulted in the load spectrum applied to crank pin bearing. This load was applied to the FE model in ABAQUS, and boundary conditions were applied according to the engine mounting conditions. The analysis was done for different engine speeds and as a result critical engine speed and critical region on the crankshaft were obtained. Stress variation over the engine cycle and the effect of torsional load in the analysis were investigated. Results from FE analysis were verified by strain gages attached to several locations on the crankshaft. Results......

Words: 3588 - Pages: 15

Free Essay

Input/Output Deices

... Input Keyboard: This is used to input letters and numbers into programs or applications wired or wirelessly. Microphone: This can be used to record sound and then be saved in a file on the computer. Mouse: This is used to navigate through applications or open and close files in your computer. Camera: This is used to take pictures then can be hooked up to a computer to transfer the pictures from the camera to the computer. Webcam: This is used in live conversations to transmit pictures from one person to another or to make a video. Scanner: This is used to scan pictures or things and saved into the computer as files. Output Monitor: This is a screen where numbers, words, and graphics can be seen. Printer: This can print numbers, words, and graphics that are on your monitor screen and put them on paper. Speakers: These are used to play sound from your device so others may listen. Headphones: These are also used to play sound but are worn on head and meant to be used for 1 person. Projector: This is used to display information from your device through the port that it is connected from. Input and Output Television: This is both an input and output device because you can push its buttons and change the TV settings also it displays pictures and produces sound. Phone: This is both an input and output device because you can dial in numbers and letters also speak into it and you can receive calls and talk with another person. GPS: This is both an input......

Words: 334 - Pages: 2

Premium Essay

Computer Input-Output Technologies That Link Pilots and Air Traffic Controllers

...Case Study: Computer Input-Output Technologies that Link Pilots and Air Traffic Controllers CSCI 109 Computer Input-Output Technologies that Link Pilots and Air Traffic Controllers Both videos presented showcase the advanced computing technologies being used to revolutionize the air traffic control system. The efficiency they are enabling is actually redrawing airspace, reducing harmful carbon emissions, improving on-time performance and increasing profitability for the airlines. The innovative applications of computer technologies are the genesis of this revolution. The computer technologies evident in this case study include servers, workstations, user input devices and other peripherals. One of these technologies is the Controller-Pilot Data Link (CPDL). This system provides air-ground data communication for the air traffic control service. The controller and the pilot are provided with the capability to communicate messages, clearances and other important information. “A ‘free text’ capability is also provided to exchange information not conforming to defined formats. An auxiliary capability is provided to allow a ground system to use data link to forward a CPDLC message to another ground system.” (Wikipedia, 2013) This process enhances the workload capability of the controllers and pilots in high-traffic air space. In addition, it increases accuracy in communication as compared to traditional VHF radio traffic. Anyone that has engaged in a text message......

Words: 515 - Pages: 3

Free Essay

Input Output Devices in Aviation

...Input-Output Devices in Aviation David Campbell Embry-Riddle Aeronautical University Computer input-output technology is being used increasingly more in the aviation field every day. This is especially true for communication between pilots in the air, and air traffic controllers on the ground, allowing them to communicate through text messages. Previously, the only way to communicate was by talking over the radio on VHF frequency. This technology is a great benefit to pilots and controllers reducing their work load. But some challenges lie ahead to fully integrate this system. Europe has been using this technology for a few years now while the United States is just recently out of the testing phase to implement this technology. (Eurocontrol.TV, 2010) The flight data processing system in Europe is trajectory based, and is constantly being updated throughout the flight. This gives flight controllers the most up to date information and gives them the ability to predict workloads for various control sectors. This technology allows controllers to view instrument data from the cockpit in real time. Commercial aircraft in the United States has just recently started using the global High Frequency Data Link (HFDL) network as a means to communicate with ATC. This gives controllers and pilots the ability to exchange text and data messages over a long range utilizing high-frequency radio signals. (Keller, 2012) “FANS is short for the Future Air Navigation System...

Words: 493 - Pages: 2

Free Essay

Input Output Devices

...Input and output devices Input and output devices are a vital part of each computer, whether personal or public all come equipped with these devices or ports. These parts are very important as they enable us to control the computer and information in a variety of ways. Now having a vast array of ports and devices, there are some that are used more than others. Example an input device would be the keyboard, it is used to type or tell the computer what it is we want to do. Another would be the monitor in which it displays whatever it is that we are typing or if watching a video, displaying at the time it is playing. Now an example of an output device we use daily would be speakers for listening to music already stored on the computer. An example of an I/O port that is used by everyone using a computer would be the USB port. It connects everything from printers, scanners, and flash drives, all the way to cellphones to be charged as well as connecting a laptop to a desktop to transfer information. But this is the most used port out of any on a computer. Now, there are devices that can be considered an input as well as an output device. One of these devices that is considered to be both could be a modem. The case being, that it retrieves but also sends data at the same time, thus being an input and output device simultaneously. Furthermore printers can also be considered an input device though they are mostly known for being output devices. The reason they can also be an input......

Words: 345 - Pages: 2

Free Essay

Input and Output Devices

...Norah Stanley NT 1110 July 12, 2014 INPUT AND OUTPUT DEVICES Chapter three of the textbook Computer Structure and Design is all about the different types of input and output devices that are found on many laptops and desktops. Input and output devices are ports that transfer information. Some examples of input and output ports are USB, HDMI and Network ports. I will discuss their functions and where they are located on the Dell Inspiron 3542 laptop. One of the most popular ports I use is the USB port. USB stands for universal serial bus. The three types of USB ports are USB 1.1, USB 2.0 and USB 3.0. Each port transfers data but at different speeds. The USB 1.1 ports has a top speed of 12 Mbps. The USB 2.0 has a top speed of 480 Mbps. The USB 3.0 has the fastest transfer speed of 4,800 Mbps. The Dell Inspiron 3542 has three USB ports. On the left side of the laptop, there is one USB 2.0 and one USB 3.0 port. The right side of the laptop has the other USB 2.0 port. Another port that is used to transfer information is the HDMI port. HDMI stands for high definition multimedia interface. The HDMI port and cord are used to transport digital video and audio from one device to another. Many smartphones, tablets, dvd and blu ray players laptops, high definition televisions, computer monitors and cameras have an HDMI port. Most of the electronic devices I mentioned usually come with one HDMI port. High Definition televisions are equipped with two or......

Words: 439 - Pages: 2

Free Essay

Unix Input and Output

...Jason Martin CS126-1501A-02 Unix Fundamentals 01/12/2015 UNIX Commands – Input and Output 1.) The cd or “change directory” command will show you where you are currently at within the directory structure. The command is intended to allow a user to move throughout the shell’s directory structure to add, delete, or to make any necessary changes to a file system. In this example, since the cd command was only used without any path, then it will keep a user in the current directory. 2.) The mkdir or “make directory” command allows the user to create a directory within the directory structure or file system. In the above command the intention was to create a directory named apache in the file system. As you can see with the ls command, apache is now a directory within the home or root directory. 3.) The cd APACHE command is intended for the user to access or choose the APACHE directory. However, UNIX is case sensitive and sense the directory is lowercase (apache), you receive a no such file or directory. 4.) The cd apache command is similar to the previous command, however, when this specific command is entered in the shell, it moves the user into the apache directory within the file system. You can determine which directory you are in by seeing ~/apache#. This shows that you are in the apache directory within the root or home directory. 5.) The pwd command shows the user the path to the current directory that they are working in. In the screenshot above, you......

Words: 614 - Pages: 3

Premium Essay

Input

...Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet Chapter 7 Input and Output Objectives Overview Differentiate among various  types of keyboards:  standard, compact, on‐ screen, virtual, ergonomic,  gaming, and wireless Describe characteristics of  various pointing devices:  mouse, touchpad, pointing  stick, and trackball Describe various types of  pen input: stylus, digital  pen, and graphics tablet See Page 288 for Detailed Objectives Describe various uses of  touch screens Describe various uses of  motion input, voice input,  and video input Discovering Computers 2014: Chapter 7 2 Objectives Overview Differentiate among various  scanners and reading devices Explain the characteristics of  various displays Identify the purpose and features  of speakers, headphones and  earbuds, data projectors,  interactive whiteboards, and  force‐feedback game controllers  and tactile output See Page 288 for Detailed Objectives Summarize the various types of  printers Identify various assistive  technology input and output  methods Discovering Computers 2014: Chapter 7 3 What Is Input? • Input......

Words: 3910 - Pages: 16

Free Essay

Input Output Interfaces

...The Professor Messer video Input/output Interfaces ranging from Audio ports, Video ports, USB ports and the Serial port. In summary the video starts with talking about the Audio ports that are 3 and a half millimeter TRS plugs that have different colors that define them. However, these colors are not standard so it advices that we double check just to make sure the right plug is put in the right port. The Video ports follow next in the video. With these we look at the Analog type which had the VGA (Video Graphic Array) port also known as the DE-15. This one has been here forever. It’s a 15 pin connector with DE size. With the Video ports we also look at the Digital ports which include the DVI (Digital Video Interface). This one is able to support a lot of the video format both digital and analog. Video ports also include the HDMI port (High Definition Multimedia Interface). This one is the latest and is always digital. It’s able to support digital and to send audio as well. Most machines produced these days have this port. USB (Universal Serial Bus) are the other ports talked about. These are very common and may look similar at times but support different speeds. * USB 1.0 is the low speed interface, not common anymore but ran at 1 and half megabits per second. * USB 1.1 is known as the full speed USB port that runs at 12 megabits per second. * USB 2.0 is very common with a lot of machines today, it runs at a speed of 480 megabits per second and can used for...

Words: 632 - Pages: 3

Free Essay

Input

...The Input Subsystem: Mango Commodity 1. Major Inputs Used Mango production is said to be input-intensive as inputs cost per kilogram in pesos is 4.8 and share in total, 32.9 %. The farm inputs (planting materials, chemicals, fertilizers – organic and synthetic, financing assistance and technologies) take up nearly a third of production cost; and another third of imputed costs of labor and capital account. Profit per kg is P10.00 (FAO 2013). Table _. Cost and Return Analysis per Hectare of MANGO Production, 2011P  ITEM | Amount (Pesos) | CASH COSTS | | Seeds/Planting Materials | - | Fertilizer | 16,357 | Pesticides | 7,134 | Other Material Inputs | - | Hired Labor | 10,070 | Wages for Overseer | - | Land Tax | 791 | Rentals | 1,732 | Water/Electric Bills | 281 | Fuel and Oil | 1,726 | Transport of Inputs | - | Irrigation Fee | - | Interest Payment on Crop Loan | 1,133 | Food Expense | 1,168 | Repairs | 1,292 | Landlord's Share | - | Electric Bill | - | Others | - | Sub-total | 41,684 | NON-CASH COSTS | | Seeds Paid in Kind | - | Hired Labor Paid in Kind | 632 | Wages for Overseer Paid in Kind | - | Rentals Machine and Vehicle | 118 | Landlord's Share Paid in Kind | 3,037 | Harvester's Share | 610 | Lease Rental | - | Sub-total | 4,397 | IMPUTED COSTS | | Operator and Family Labor | 5,014 | Exchange Labor | - | Depreciation | 10,676 | Interest on Operating Capital | 5,370 | Rental Value of......

Words: 1242 - Pages: 5

Free Essay

Computer Input/ Output

...What is the meaning behind Computer Input / Output Architecture and Organization? Input is the entering of data into a computer system, whereas output is the transferring of data to an external item, such as printer. “The input /output modules are the third critical element of a computer system. The CPU and Memory are the first and second most critical elements.” (C.A.O). “The computer system’s Input /Output architecture is its interface to the outside world. This architecture is designed to provide a systematic means of controlling interaction with the outside world and to provide the operating system with the information it needs to manage I/O activity effectively.” (C.O.A.L). There are three main techniques for I/O, which are Programmed, Interrupt-Driven, and Direct Memory Access (DMA). These three techniques are essential for I/O. The Programmed I/O happens under direct and continuous control of a program requesting the operation. The Interrupt-Driven is when a program issues a command and continues to execute, until it’s interrupted by the hardware to signal the end of the operations. Finally, the DMA is when a specialized processor takes over control of an operation to move a large block of data. All three play significant roles in the architecture of the I/O in a Computer. An organization will have to have a large inventory of assets for just the basic Input Devices, Output devices, and both Input/ Output Devices related to the architecture of a company. A......

Words: 1252 - Pages: 6

Free Essay

Ifsm 300 Input Process Output Learning Activity

...IFSM 300 Input Process Output Learning Activity Question 1 Which of the following is not a business process? Question 1 options: A) Hiring employees B) Paying taxes C) Running the business D) Ringing up a sale Question 2 Question 2 options: The result of a process is the Question 3 In the process "Grade final exams" which of the following are inputs? (select all that apply) Question 3 options: A) Final exam papers submitted B) Answer key C) Student grades on final exam D) Faculty marks the correct and incorrect answers on the exams Question 4 Question 4 options: The information needed for a process to occur is called Question 5 For the process "Make a peanut butter and jelly sandwich" which of the following are the outputs? Question 5 options: A) Peanut butter B) a sandwich C) a full stomach D) the recipe for how to make a peanut butter and jelly sandwich Question 6 True or false: Processes contain action words, or verbs, in their description, whereas inputs and outputs usually do not contain verbs. Question 6 options: Question 7 Question 7 options: The steps taken to change input to output is called a Question 8 For the process of enrolling a student in a class, which of the following are the inputs? (select all that apply) Question 8 options: A) list of names of students in the class B) student name C) ...

Words: 295 - Pages: 2

Free Essay

Ifsm 300 Input Process Output Learning Activity

...IFSM 300 Input Process Output Learning Activity Question 1 Which of the following is not a business process? Question 1 options: A) Hiring employees B) Paying taxes C) Running the business D) Ringing up a sale Question 2 Question 2 options: The result of a process is the Question 3 In the process "Grade final exams" which of the following are inputs? (select all that apply) Question 3 options: A) Final exam papers submitted B) Answer key C) Student grades on final exam D) Faculty marks the correct and incorrect answers on the exams Question 4 Question 4 options: The information needed for a process to occur is called Question 5 For the process "Make a peanut butter and jelly sandwich" which of the following are the outputs? Question 5 options: A) Peanut butter B) a sandwich C) a full stomach D) the recipe for how to make a peanut butter and jelly sandwich Question 6 True or false: Processes contain action words, or verbs, in their description, whereas inputs and outputs usually do not contain verbs. Question 6 options: Question 7 Question 7 options: The steps taken to change input to output is called a Question 8 For the process of enrolling a student in a class, which of the following are the inputs? (select all that apply) Question 8 options: A) list of names of students in the class B) student name C) ...

Words: 295 - 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 of the product/service. There may be more than  There may be more than one input! Start  process Decision Operation No Yes No Yes Decision Operation There may be more than one  There may be more than one output throughout the process. Input Operation Output End Operation Operation Use hierarchical maps to p drill down into the detail Decision Start  process Decision Operation Operation No Yes Input Operation No Yes Output End Operation Operation Decision Start  process Decision Operation Operation No Yes Input Operation No Yes Output End Operation Operation O ti Decision Start  process Decision Operation Operation No Yes Input Operation No Yes Output End Operation Operation Example Process Mapping Symbols p pp g......

Words: 2770 - Pages: 12