Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
chazog
/
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
1f78a09c
authored
Dec 16, 2018
by
chazog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete Task1.c
parent
674f5b01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
82 deletions
Task1.c
Task1.c
deleted
100644 → 0
View file @
674f5b01
#include <stdio.h>
#include <math.h>
int
add
(
int
m
,
int
n
);
int
subtraction
(
int
m
,
int
n
);
int
multiplication
(
int
m
,
int
n
);
float
division
(
float
m
,
float
n
);
int
main
()
{
int
m
,
n
;
int
sum
;
int
subtract
;
int
multiply
;
float
divide
;
int
op
;
printf
(
"Enter the values of m & n: "
);
scanf
(
"%d %d"
,
&
m
,
&
n
);
printf
(
"1.Addition
\n
2.subtraction
\n
3.multiplication
\n
4.division
\n
"
);
printf
(
"Enter your Choice : "
);
scanf
(
"%d"
,
&
op
);
switch
(
op
)
{
case
1
:
sum
=
add
(
m
,
n
);
printf
(
"%d"
,
sum
);
break
;
case
2
:
subtract
=
subtraction
(
m
,
n
);
printf
(
"%d"
,
subtract
);
break
;
case
3
:
multiply
=
subtraction
(
m
,
n
);
printf
(
"%d"
,
multiply
);
break
;
case
4
:
divide
=
division
(
m
,
n
);
printf
(
"%f"
,
divide
);
break
;
default:
printf
(
" Enter Your Correct Choice."
);
break
;
}
return
0
;
}
int
add
(
int
m
,
int
n
)
{
int
output
;
output
=
m
+
n
;
return
output
;
}
int
subtraction
(
int
m
,
int
n
)
{
int
output
;
output
=
m
-
n
;
return
output
;
}
int
multiplication
(
int
m
,
int
n
)
{
int
output
;
output
=
m
*
n
;
return
output
;
}
float
division
(
float
m
,
float
n
)
{
float
output
;
output
=
m
/
n
;
return
output
;
}
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