Академический Документы
Профессиональный Документы
Культура Документы
– Control Unit
Control unit
The control unit (CU) is a component of a computer's central processing unit (CPU)
that directs the operation of the processor. It tells the computer's memory,
arithmetic and logic unit and input and output devices how to respond to the
instructions that have been sent to the processor.
Input / Output Unit (I/O)
The term I/O is used to describe any program, operation or device that transfers data
to or from a computer and to or from a peripheral device.. Devices such as
keyboards and mouses are input-only devices while devices such as printers are
output-only. A writable CD-ROM is both an input and an output device.
C. Write a C++ program that may ask the user to enter the values of mass and
velocity and compute Kinetic Energy. It should also prompt the user to enter
values in SI units and also mention the units of the computed Kinetic Energy.
Input programme,
#include<iostream>
using namespace std;
int main()
{
int mass,velocity,ke;
cout<<"Enter Vaue of Mass in SI unit = ";
cin>>mass;
cout<<"Enter value of Velocity in SI unit = ";
cin>>velocity;
ke=0.5*mass*velocity*velocity;
cout<<"KINETIC ENERGY = "<<ke<<"kg m2/s2";
return 0;
}