Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gürcan Güleç
/
iag0581
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
502ee615
authored
Dec 09, 2016
by
Gürcan Güleç
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding a few things to homework2.c
parent
fc8b0469
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
homework2/homework2.c
homework2/homework2.c
View file @
502ee615
/**
* File: homework2.c
* Author: Gurcan Gulec
* Created: 6 December 2016
* Last Edit: 9 December 2016
*
* Description: Homework 2.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// to limit random created numbers between certain values
int
rndHigh
=
100
;
int
rndLow
=
1
;
int
clerk
;
// filling the matrix with random values
void
fillMatrix
(
int
arr
[
100
][
100
],
int
row
,
int
column
)
{
int
rndHigh
=
100
;
int
rndLow
=
1
;
for
(
int
i
=
0
;
i
<
row
;
i
++
)
{
for
(
int
j
=
0
;
j
<
column
;
j
++
)
...
...
@@ -41,7 +49,7 @@ void readMatrix(int arr[100][100], int row, int column)
}
}
//finding the totals in each column
//
finding the totals in each column
void
findTotals
(
int
arr
[
100
][
100
],
int
row
,
int
column
)
{
printf
(
" Total"
);
...
...
@@ -57,6 +65,7 @@ void findTotals(int arr[100][100], int row, int column)
printf
(
"
\n
"
);
}
// finding the clerk that is most productive
void
findClerk
(
int
arr
[
100
][
100
],
int
row
,
int
column
)
{
int
clerk
;
...
...
@@ -79,6 +88,7 @@ void findClerk(int arr[100][100], int row, int column)
printf
(
"
\n
"
);
}
// displaying the matrix
void
displayMatrix
(
int
arr
[
100
][
100
],
int
row
,
int
column
)
{
readMatrix
(
arr
,
row
,
column
);
...
...
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