You are on page 1of 4

DAY -1 ASSIGNMENT

ASSIGNMENT NO.1
PSEUDOCODE:1. Input worked_hours,payrate 2. Gross_pay=worked_hours*payrate 3. Display gross_pay

ASSIGNMENT NO.2
TRACE TABLE:Line no. 1 2 3 Worked_hours 10 Payrate 40 Gross_pay 400 400 output

ASSIGNMENT NO.3
PSEUDOCODE:1. Input worked_hours,payrate 2. If (worked_hours<=0) then 3. Display THERE IS A ERROR 4. Else 5. 6. Gross_pay =worked_hour*payrate Display gross_pay

7. End if

ASSIGNMENT NO.4
TRACE TABLE

Line no. 1 2 1 2 1

Worked_hours 40 0 -20

Payrate 60 60

Condition false true

Output 240 THERE IS A ERROR THERE IS A ERROR

60 true

ASSIGNMENT NO.5
PSEUDOCODE
1. Input worked_hours,payrate 2. While(worked_hours<=0) do 3. Display there is a error

4. Input worked_hours 5. End while 6. Gross_pay=worked_hours*payrate 7. Display Gross_pay is: ,gross_pay

ASSIGNMENT NO.6
TRACE TABLE
Line number 1 2 6 7 1 2 3 4 20 0 30 true There is error Worked_hour s 10 Payrate 30 false 300 Gross pay is:400 Condition Gross_pay Output

2 6 7 1 2 3 4 2 6 7 1 -1 30

false 600 Gross pay is:600 true There is error false 30 Gross pay is:30

ASSIGNMENT NO.7
PSEUDOCODE-1
1. Input number 2. If(number>=0) then 3. Display POSITIVE NUMBER 4. Else 5. Display NEGATIVE NUMBER 6. End if

PSEUDOCODE-2
1. Input year 2. if(year>1600&&year<2012) 3. 4. 5. 6. 7. 8. Else If(year%4==0||year%400==0) Display year is a leap year Else Display year is not leap year End if

9. Display year is out of range 10.End if

You might also like