Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Samuel Oliveira
lp1-2020.5
Commits
2db64cfd
Commit
2db64cfd
authored
Jul 14, 2020
by
Samuel Oliveira
Browse files
Exemplo printArray adicionado na aula 5
parent
b2226501
Changes
2
Hide whitespace changes
Inline
Side-by-side
Aula 5/Print Array/a.out
0 → 100755
View file @
2db64cfd
File added
Aula 5/Print Array/main.cpp
0 → 100644
View file @
2db64cfd
#include
<iostream>
using
namespace
std
;
template
<
class
X
>
void
printArray
(
X
*
array
,
int
size
){
for
(
int
i
=
0
;
i
<
size
;
i
++
){
cout
<<
array
[
i
]
<<
endl
;
}
}
int
main
(){
int
vet1
[
5
]
=
{
1
,
2
,
3
,
4
,
5
};
double
vet2
[
5
]
=
{
1.1
,
2.2
,
3.3
,
4.4
,
5.5
};
char
vet3
[
5
]
=
{
'a'
,
'b'
,
'c'
,
'd'
,
'e'
};
printArray
(
vet1
,
5
);
printArray
(
vet2
,
5
);
printArray
(
vet3
,
5
);
return
0
;
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment