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
12fd32d0
authored
Sep 28, 2016
by
Gürcan Güleç
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Committing the multiplication table file
parent
8323b287
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
bonus/multiplication.c
bonus/multiplication.c
0 → 100644
View file @
12fd32d0
/**
* File: multiplication.c
* Author: Gurcan Gulec
* Created: 28 September 2016
* Last edit: 28 September 2016
*
* Description: Learning scanf and trying to create a multiplication table.
*
*/
#include<stdio.h>
int
main
()
{
int
n
;
// asking for a number from the user
printf
(
"Please enter a number: "
);
scanf
(
"%d"
,
&
n
);
// declared variables to use inside the loop
int
i
;
int
k
;
// starting the loops
for
(
k
=
1
;
k
<=
n
;
k
++
)
{
for
(
i
=
1
;
i
<=
n
;
i
++
)
{
printf
(
"%5d "
,
i
*
k
);
}
printf
(
"
\n
"
);
}
return
0
;
}
~
~
\ No newline at end of file
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