Documente Academic
Documente Profesional
Documente Cultură
ALGORITHM
Assignment #01
Pseudo Code:
READ Number
Reminder=Number%2
IF Reminder==0
PRINT “Number is Even”
ElSE
PRINT “Number is Odd”
Pseudo Code:
READ Area
READ Temperature
IF (Temperature < 32F)
SHOW “Below Freezing point”
ELSE
SHOW “Above Freezing point”
3.Should I do my Assignment.
Algorithm:
1. Start
2. [Check Assignment on Portal] Read: Assignment status
3. If Assignment not available
4. Don’t do it.
5. Else, If Assignment is Available,
6. Check Due date
7. If Due date Available
8. Download Assignment and Complete Assignment
9. Else Do not do Assignment
10. Step 4: Finish
Pseudo Code:
READ Assignment
IF(Assignment == Available)
IF(AssignmentDueDate ==Available)
Download Assignment
Complete Assignment
Submit
ELSE
Skip Assignment
ELSE:
Assignment is not uploaded yet.
Pseudo Code:
READ PA, TY, RY
Interest =(PA*TY) *(RY/100)
Print: Interest
Pseudo Code:
FLOAT CalculateNetPay( BasicSalary, DearnessAllowence,
HouseRentAllowence, GrossSalary, ProvidentFund, NetPay)
START
Read BasicSalary
FLOAT DearnessAllowence=(0.25* BasicSalary)
FLOAT HouseRentAllowence =(0.15* BasicSalary)
FLOAT GrossSalary = BasicSalary + DearnessAllowence + HouseRentAllowence
FLOAT ProvidentFund =(GrossSalary *0.10)
FLOAT NetPay = GrossSalary – ProvidentFundDSIPLAY “Net Salary of
Employee is: NetPay”
IF (NetPay>=80.0)
SHOW “Grade A”
ELSE
IF (NetPay >=73.0&&NetPay <80)
SHOW“Grade B+”
ELSE
IF (NetPay >=66&&NetPay <70)
SHOW “Grade B”
ELSE
SHOW “C
Flow Chart 1: Start
Read Number
NUMBER%2= false
=0
true
Display Odd Number
Finish
Flow Chart 2: Input Area Input Temperature
Start
TRUE Temperature<
Below Freezing Point
32
FALSE
Finish
Flow Chart 3
Start
Assignment == True
Available
== Available
Do not do Assignment
False True
Finish
Flow Chart 4:
Input RY
Finish
Flow Chart 5:
-s
-s
-s
-s
SHOW NetPay
NetPay>=73&
&NetPay <80 NetPay >=80
False
FALSE True
True
Output Grade A
FALSE output B+ Output A
Output Grade B+
False
OutputGrade C
Finish