Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
emonyi
/
IAX0583
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
d9eca1f4
authored
Nov 05, 2018
by
emonyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete EmmanuelHomework1.c
parent
f4b9eb09
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
66 deletions
EmmanuelHomework1.c
EmmanuelHomework1.c
deleted
100644 → 0
View file @
f4b9eb09
/**
* File: Homework1.c
* Author: ONYIA Emmanuel Chinedu
* created: 12.10.2018
* Last edit: 20.10.2018
*
* Desription:
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define LIMIT 15
int
main
(
void
)
{
//intialization of variables
double
t
;
float
A
=
0
;
int
i
=
0
;
int
N
=
0
;
float
H
=
0
;
float
x
;
double
y
;
//User enters values
//do-while statement ensuring user input A > 0; H > 0
do
{
printf
(
"Enter the starting value A for arguments: "
);
scanf
(
"%f"
,
&
A
);
if
(
A
<=
0
)
{
printf
(
"
\n
The starting value must be Greater than 0
\n\n
"
);
}
}
while
(
A
<=
0
);
do
{
printf
(
"Enter the step value H for arguments: "
);
scanf
(
"%f"
,
&
H
);
}
while
(
H
<=
0
);
printf
(
"
\n
s/n
\t
Arguments (X)
\t
Function(Y)
\n
"
);
x
=
A
;
//for loop for number of prints limit 15
for
(
N
=
0
;
N
<
LIMIT
;
N
++
)
{
//mathematical equation
x
+=
i
*
(
H
);
y
=
(
pow
(
sin
(
t
+
5
),
2
)
+
cos
(
t
))
/
(
x
+
exp
(
t
+
3
));
//output print statement
printf
(
" %d
\t
%0.2f
\t\t
%0.4f
\n
"
,
N
+
1
,
x
,
y
);
i
++
;
}
return
0
;
}
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