Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
Project 3 Star Gazing
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Walsh
Project 3 Star Gazing
Commits
f1438aca
Commit
f1438aca
authored
Mar 12, 2019
by
Walterio Montanez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autosave
parent
b59add93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
Functions.cpp
Functions.cpp
+11
-7
No files found.
Functions.cpp
View file @
f1438aca
...
...
@@ -142,13 +142,17 @@ pair<double,double> altAndAziPair (double altitude, string Direction) {
double
Azi
;
pair
<
double
,
double
>
aziPair
;
cout
<<
"Enter the altitude at which you are looking : "
;
if
(
!
(
cin
>>
altitude
))
{
// validates that numbers were entered and checks input
cerr
<<
"Error! Please enter a valid integer."
<<
endl
;
cin
.
clear
();
cin
.
ignore
(
1000
,
'\n'
);
continue
;
}
do
{
cout
<<
"Enter the altitude at which you are looking (0-90): "
;
if
(
!
(
cin
>>
altitude
))
{
// validates that numbers were entered and checks input
cerr
<<
"Error! Please enter a valid integer."
<<
endl
;
cin
.
clear
();
cin
.
ignore
(
1000
,
'\n'
);
continue
;
}
else
if
(
altitude
<
0
||
altitude
>=
90
)
{
cout
<<
"Please put in a valid value."
<<
endl
;
}
}
while
(
false
)
do
{
cout
<<
"Enter a cardinal direction (North, South, East, West, Northeast, Southeast, Southwest, or Northwest): "
;
...
...
Write
Preview
Markdown
is supported
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