Você está na página 1de 3

PRONATEC/FACULDADE INTEGRADA DA GRANDE FORTALEZA Curso: Tcnico em Informtic !

"#u$o: A$%oritmo e L"%ic #e Pro%r m &'o Professor( ): * ness C $# s A$uno( ): A$in+ ,e$$+ Ferreir #e -ous - $ : E./ 0 Turno: T r#e Atividade: F & um 1ro%r m 1 r c $cu$ r cont fin $ #e um 2"s1e#e #e um 2ote$3 consi#er n#o 4ue: ) -er'o $i#os o nome #o 2"s1e#e3 o ti1o #o 1 rt mento uti$i5 #o (A3 63 C ou D)3 o n7mero #e #iri s uti$i5 # s 1e$o 2"s1e#e e o 8 $or #o consumo interno #o 2"s1e#e9 :) O 8 $or # #iri #etermin #o 1e$ se%uinte t :e$ : Tipo de Apt. A 6 C D Valor da diria (R$) ;/<3<< ;<<3<< =/3<< /<3<<

c) O 8 $or tot $ # s #iri s c $cu$ #o 1e$ mu$ti1$ic &'o #o n7mero #e #iri s uti$i5 # s 1e$o 8 $or # #iri 9 #) O su:tot $ c $cu$ #o 1e$ consumo interno9 e) O 8 $or # t > #e ser8i&o e4ui8 $e %) Escre8 ;<? #o su:tot $9 t > #e ser8i&o@ #iri 3 o 8 $or tot $ # s f) A tot $ %er $ resu$t # som #o su:tot $ com som #o 8 $or tot $ # s #iri s e o 8 $or #o

cont fin $ conten#o: o nome #o 2"s1e#e3 o ti1o #o 1 rt mento3 o

n7mero #e #iri s uti$i5 # s3 o 8 $or unitrio # tot $ %er $@

#iri s3 o 8 $or #o consumo interno3 o su:tot $3 o 8 $or # t > #e ser8i&o e o

Resoluo: Program Conta_Final; var hospede, apto: string; diaria, vudiaria, vtdiaria, consumoint, subtotal, taxa, totalgeral: real; Begin writeln (' n!orme o nome do h"spede#'$; readln (hospede$; writeln (' n!orme o tipo de apartamento#'$; readln (apto$; writeln (' n!orme o n%mero de di&rias#'$; readln (diaria$; writeln (' n!orme o valor unit&rio da di&ria#'$; readln (vudiaria$; writeln (' n!orme o valor do consumo interno#'$; readln (consumoint$; i! (apto ' '('$ then vtdiaria:'diaria)*+, else i! (apto''B'$ then vtdiaria:'diaria)*,, else i! (apto''C'$ then vtdiaria:'diaria)-+ else i! (apto''.'$ then vtdiaria:'diaria)+,; subtotal:'vtdiaria/consumoint; taxa:',#*,)subtotal; totalgeral:'subtotal/taxa; writeln ('0ome do 1"spede: ', hospede, ' 2ipo de (partamento: ', apto, ' 0%mero de di&rias: ', diaria, ' 3alor unit&rio da di&ria: ', vudiaria, ' 3alor total da di&ria: ', vtdiaria, ' 3alor do consumo interno: ', consumoint, ' 4ubtotal: ', subtotal, ' 3alor da 2axa de servi5o: ', taxa, ' 2otal 6eral: ', totalgeral$; 7nd#

Depois de executado o seguinte resultado apresentado:

o!pilador utili"ado: P sc $ ZimA/@;;

Você também pode gostar