Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
tranvu
/
iax583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
de8eab89
authored
Oct 05, 2018
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed minor bug
parent
197c5f10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
HW1_182416MVEB_Tran_Vu/main.c
HW1_182416MVEB_Tran_Vu/main.c
View file @
de8eab89
...
@@ -73,7 +73,7 @@ int main() {
...
@@ -73,7 +73,7 @@ int main() {
printf
(
"Please input increment value: "
);
printf
(
"Please input increment value: "
);
scanf
(
"%f"
,
&
incre
);
scanf
(
"%f"
,
&
incre
);
// If increment is s
n
aller than or equal to 0, we return an error
// If increment is s
m
aller than or equal to 0, we return an error
if
(
incre
<=
0
)
{
if
(
incre
<=
0
)
{
printf
(
"Increment have to be > 0"
);
printf
(
"Increment have to be > 0"
);
return
1
;
return
1
;
...
@@ -99,8 +99,8 @@ int main() {
...
@@ -99,8 +99,8 @@ int main() {
y
=
log
(
i
+
5
)
/
sqrt
(
7
+
5
*
i
+
i
*
i
);
y
=
log
(
i
+
5
)
/
sqrt
(
7
+
5
*
i
+
i
*
i
);
// This stores and display the result (y) by using the addToTable function
// This stores and display the result (y) by using the addToTable function
yResults
[
i
]
=
y
;
yResults
[
number
-
1
]
=
y
;
addToTable
(
i
,
yResults
[
i
]);
addToTable
(
i
,
yResults
[
number
-
1
]);
if
(
isnan
(
y
))
y
=
lim
-
1
;
if
(
isnan
(
y
))
y
=
lim
-
1
;
// As number is = 16, it is too much and we stop the loop
// As number is = 16, it is too much and we stop the loop
...
...
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