Tarea 1 Algo
-
Upload
noemi-thalia-martinez-riveros -
Category
Documents
-
view
222 -
download
0
Transcript of Tarea 1 Algo
-
7/26/2019 Tarea 1 Algo
1/5
Pregunta 1_header
#ifndef MITRIGO_H
#dene MITRIGO_H
#include
#includeuing name!ace td"
#dene $%O&n' in&n'
#dene (O$%O&n' co&n '
#dene T)%G$%T$&n' tan& n'
#dene (OT)%G$%T$&n' !o*&T)%G$%T$&n'+,1'
#dene (O$()%T$&n' !o*&$%O&n'+,1'
#dene $()%T$&n' !o*&(O$%O&n'+,1'
--H)O $ $G/%0O )%G/O $% )$ ) 0O )0O 2 /% )%G/O
#dene $20$$%O&a+3+n' &34!o*&$%O&n'+,1'-a'
--H)O $ T$R($R )0O $% )$ ) 0O )0O 2 / )%G/O 0$ 5R$%T$#dene $20$(O$%O&a+3+n' 6rt&a4a 7 343 7a434(O$%O&n''
--5/%(IO% P)R) H))R $ $G/%0O )G/O POR ) $2 0$ $%O
8oat le9en&int a+int 3+int n'
:
8oat le9e"
le9e;&34!o*&$%O&n'+,1'-a'"
return le9e"
--5/%(IO% P)R) H))R $ T$R($R )0O POR ) $2 0$ (O$%O
8oat le9coen&int a+int 3+int n'
:
8oat le9co"
le9co;6rt&a4a 7 343 7a434(O$%O&n''"
return le9co"
#endif -- MITRIGO_H
Pregunta 1_main#include
-
7/26/2019 Tarea 1 Algo
2/5
#include=mitrigo.h=
uing name!ace td"
main&'
:
8oat ang"
int a+ 3+e"
cout >a>>3"
cout
-
7/26/2019 Tarea 1 Algo
3/5
Pregunta ?_header
#ifndef MI)RR$GO_H
#dene MI)RR$GO_H
#include
#include
uing name!ace td"
@oid leer&int numeroAB+int n'
:
for&int i;1"i>numeroAiB"
@oid im!rimir&int numeroAB+int n'
:
for&int i;1"i
-
7/26/2019 Tarea 1 Algo
4/5
:
if&men>numeroAiB'
men;numeroAiB"
return men"
@oid media_geo&int numeroAB+int n'
:
8oat !ro;1+geo+!roducto "
int mu+i"
8oat cu"
for&int i;1"i
-
7/26/2019 Tarea 1 Algo
5/5
uing name!ace td"
int main&'
:
int numA1CCB+%"
cout
cout