Music ku

Friday, February 25, 2011

QUESTION of EXERCISES on 23/02/2011

1. Write correct C++ syntax for each statement below;
a) Initializing, variable Pi with the value 3-14
b) Declare a variable named Pen meter with double datatype
c) Give instruction that allowed used to input data  
d) Input number of computer using variable 


2. Solve the question below. Show the working.
a) 5*2 % 3+25/5
b) a=5, b=6
    !((a<3) && (a==3) || (b>a))


3. Identify syntax errors in the following program. (5 errors)
    include <iostream.h>
    main ( )
    } float allowance = 300.00,
              salary;
    cout <<"input salary=";
    cin << salary;
    salary = salary + allowance;
    cout <<"salary is =      "<<salary
    }


4. Write a program that will calculate the monthly salary for an employee that where Saturday and Sunday considered as non-working days.


5. Write a program that calculates the average 08 5 numbers that can be input by user.


6. Write a program that will calculate the area of rectangular, triangle & circle.


***jawapan akan dbuat sketika nnty*** 


    
      

23/02/2011-on class of FOP

alhamdulillah aq dtg awl... yekew??? kikiii... whatever...
Pn Ayuni soh sign attendent... n dlm kul 1000 msk
clss agy... Cz Pn bgi g srapn dlu... um... p aq xg...
ok... Pn soh aq install C++... cmpay skg xley gk...
adoi... cmne niwh??? um...
dlm clss cm bese... law da Pn Ayuni da start mngjar...
mmg xbnty2 lah... um... so, fokus... law xfokus...
cmfirm xtwu ppew... um... b'mulanya kte owg
blja psl ARITHMETIC, RELATIONAL & LOGICAL OPERATORS...
n then INCREMENT & DECREMENT...
INCREMENT-Pre-Increment & Post-Increment.
DECREMENT-Pre-decrement & Post-Decrement..
dalam sume too... aq ley phm cket drpd yg lps2 nyer...
aq pling skew yg adew if...else & switch...case...
n then Pn Ayuni dew bgi lthn... wt by individual n other
exercises... do on blogger... um... n then...
CLASS THE END.... heheheheheee....
sume bole blikkkk yerrr....