Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cpp_introduction
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cp1_ws19
cpp_introduction
Merge requests
!1
Upload New File
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Open
Upload New File
to95diqu/cpp_introduction:undefined
into
master
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Upload New File
Kiril Klein
requested to merge
to95diqu/cpp_introduction:undefined
into
master
Oct 28, 2019
Overview
0
Commits
1
Pipelines
1
Changes
1
task_1.cpp
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
cb92a8e5
1 commit,
Oct 28, 2019
1 file
+
15
−
0
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
inputs/task_1.cpp
0 → 100644
+
15
−
0
View file @ cb92a8e5
Edit in single-file editor
Open in Web IDE
#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
;
}
Loading