logo

SIT105 Critical Thinking and Problem Solving for IT Assignment

4 Pages541 Words179 Views
   

SIT105 Critical Thinking and Problem Solving for IT (SIT105)

   

Added on  2019-10-31

SIT105 Critical Thinking and Problem Solving for IT Assignment

   

SIT105 Critical Thinking and Problem Solving for IT (SIT105)

   Added on 2019-10-31

ShareRelated Documents
Name: ID: SIT105CRITICAL THINKING AND PROBLEM SOLVING FOR IT ASSIGNMENT 2 TRIMESTER 2 2017
SIT105	Critical Thinking and Problem Solving for IT Assignment_1
1.Defining DiagramInputProcessingOutputannualSalaryInput annualSalaryannualSalaryIf annualSalary <=0 thenPrint errorInput annualSalary againIf annualSalary <= 18200 thenTax = 0If annualSalary <= 37000 thenTax = (annualSalary – 18200) * 0.19If annualSalary <= 80000 thenTax = 3572 + (annualSalary – 37000)*0.325taxIf annualSalary <= 180000 thenTax = 17547 + (annualSalary – 80000)*0.37If annualSalary >= 180001 thenTax = 54547 + (annualSalary – 180000)*0.45Print annualSalary and tax2.AlgorithmDeclare an array A with size 11//array to store the 11 numbersFor i=0 to 11://loop to input all no’s in arrayInput A[i]//Input numberDeclare avg = 0//variable to store the averageDeclare count = 0//variable to store the count of 6For i=0 to 11://loop to check each numberavg = avg + A[i]//add each number to avgIF A[i] = 6 then://if number is 6count = count + 1//increment count avg = avg/11//avg is total divide by 11PRINT avg and count//Print the values3.AlgorithmDEFINE calculate(P)://function to calculate averageDeclare total = 0//variable for total of all even no.sDeclare count = 0//variable for count of even nosFor i= 2 to P://loop to check each even noIF i%2 = 0 then://if number is eventotal = total + i//add number to totalcount = count + 1//increment countDeclare avg = total/count//avg is total divide by countRETURN avg//return average to calling func
SIT105	Critical Thinking and Problem Solving for IT Assignment_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
SIT105 Critical Thinking and Problem Solving | Report
|9
|1576
|285

Programming Principles | Assignment
|9
|533
|25

Critical Thinking and Problem Solving For IT 1 1 SIT105
|8
|830
|314

Computer Science Assignment Pseudocode
|9
|895
|315

Fundamental of IT
|9
|792
|70

Answers to given questions
|2
|560
|159