28.02.2023 Views

Logica_de_Programacao_3_Edicao_Livro

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Capítulo 6 Modularizando algoritmos 1 13 9

60.

61.

62.

63.

64.

65.

66.

67.

68.

69.

70.

71.

72 .

73.

74.

75.

76.

77.

78.

79.

80.

81.

82.

83.

84.

85.

86.

87.

88.

89.

90.

91.

92.

93.

94.

95.

96.

97.

98.

99.

100.

101.

102.

103.

104.

105.

106.

107.

108.

me~ cartão[i] .et;

me~ (me div 100)*60 + me mod 100;

filllllódulo;

módulo MinutoSaída

ms ~ cartão[i] .st;

ms ~ (ms div 100)*60 + ms mod 100;

filllllódulo;

módulo Atraso

atrt ~ me - 840;

filllllódulo;

MinutoEntrada;

MinutoSaída;

tt ~ ms - me;

Atraso;

fimmódulo;

parai de 1 até cont faça

Manhã;

Tarde;

totalDia[i].atraso ~ atrm + atrt;

totalDia[i].horas ~ tm + tt;

toth ~ toth + (tm + tt);

totatr ~ totatr + (atrm + atrt);

fimpara;

fimmódulo;

módulo Impressão

parai de 1 até cont faça

escreva (cartão[i] .em, cartão[i].sm);

escreva (cartão[i] .et, cartão[i].st);

escreva (totalDia[i].horas div 60);

escreva (totalDia[i].horas mod 60);

escreva (totalDia[i].atraso div 60);

escreva (totalDia[i] .atraso mod 60);

fimpara;

escreva ((toth/cont) div 60, (toth/cont) mod 60);

escreva (toth div 60, toth mod 60);

escreva ((totatr/cont) div 60, (totatr/cont) mod 60);

escreva (totatr div 60, totatr mod 60);

filllllódulo;

Entrada;

se cont > O

então inicio

Cálculo;

(Continua)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!