Professional Documents
Culture Documents
LAB 1 WEEK 4
"
#include <iostream.h> #define KMS_TO_MI !S ".#$% int main &' ( dou)le *ms+ dou)le mile+ 8 // -et the distance in miles cout << .!nter the distance in *ilometers : . + cin >> mile+ # // con/ert the distance *ms 0 KMS_TO_MI !S , mile+ //dis1la2 the distance in miles cout << .That is e3ui/alent to : . << *ms << . miles.. << endl+ return &$'+ 4 9 7 /,distance in *ilometers ,/ /,distance in miles ,/ 6
Activity #2 Write a program for a computer shop which calculates daily transaction !he computer shop sells monitor" #ey$oard" mouse and headphone !he price of a monitor is %4&" price of mouse is %'" price of #ey$oard is %' and price of headphone is %( )ote* student as# from user that how many items he+she want to purchase of each items ,ate (+2+14 (+2+14 (+2+14 (+2+14 -tem /onitor #ey$oard /ouse 1eadphone .uantity 2 ( 2 1 !otal price %0& %1' %1& %( %1&0