CE2409 Computer Applications in Civil Engineering L3A.pdfVIP

  • 12
  • 0
  • 约1.59万字
  • 约 37页
  • 2018-04-10 发布于河南
  • 举报

CE2409 Computer Applications in Civil Engineering L3A.pdf

CE2409 Computer Applications in Civil Engineering L3A.pdf

Logical Expressions Sequence StructureSequence Structure Selection Structure RRepetitititive St Structture AlgorithmAlgorithm??StructureStructure Structured Alggorithm An algorithm described consistently based on a set of standard forms, or structures Structured ProgramStructured Program A program written based on structured algorithmsalgorithms GeneralGeneral??StructuresStructures Steps in algorithms can be divided into 3 general structures: into 3 general structures: Three Structures Selection or Repeating Sequential Decision or Looping SequenceSequence??StructureStructure Series of steps listed one after another that are pperformed seqquentiallyy: Sequential Computation Input Output SequenceSequence??StructureStructure?? Cont’d Cont’d ComputationsComputations AverageAverage total/counttotal/count AverageAverageAverageAverage total/counttotal/counttotal/counttotal/count SequenceSequence??StructureStructure?? Cont’d Cont’d InputInput Read temperature, humidityRead temperature, humidity Read temRead tempppperature, humiditerature, humidityyyy SequenceSequence??StructureStructure?? Cont’d Cont’d OutputOutput Print “Ratio “, RatioPrint “Ratio “, Ratio Print “Ratio “Print “Ratio “,,,, Ratio Ratio Selection/DecisionSelection/Decision??StructureStructure Allows adding of branches to execution flow Selection/Decision Block IF/Block IF-ELSE 2-Way Branch CASE Multiple Branches BlockBlock IFIF--ELSEIFELSEIF Multiple Branches LogicalLogical????BlockBlock??IFIF??SyntaxSyntax IFIF conditioncondition executableexecutable??statementstatement IFIF conditioncondition THENTHEN statementstatementstatementstatement??1111 statementstatement??22 …..….. statementstatement??nn ENDEND??IFIF ConditionCondition ? Used in selection repetition structures to control execution flowstructures to control execution flow ?An expression that evaluates to either ?An expression that evaluates to either TRUE or FALSE values ? Can be in 2 forms: ?Logical Expression ?Logical E

文档评论(0)

1亿VIP精品文档

相关文档