Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kiril Klein
cpp_introduction
Commits
cb92a8e5
Commit
cb92a8e5
authored
Oct 28, 2019
by
Kiril Klein
Browse files
Upload New File
parent
dd36c79d
Pipeline
#31013
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
inputs/task_1.cpp
0 → 100644
View file @
cb92a8e5
#include
<iostream>
/*
For this task, read in a number n on cin and print out the first n square numbers each in their own line
*/
int
main
(
int
argc
,
char
**
argv
)
{
int
n
;
std
::
cout
<<
"Enter a number:"
<<
std
::
endl
;
std
::
cin
>>
n
;
std
::
cout
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<=
n
;
i
++
){
std
::
cout
<<
i
*
i
<<
"
\n
"
;
}
return
0
;
}
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