-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_opepri.c
24 lines (22 loc) · 1.06 KB
/
ft_opepri.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_opepri.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ccristia <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/11/30 01:02:43 by ccristia #+# #+# */
/* Updated: 2017/11/30 01:49:34 by ccristia ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_opepri(char c)
{
if (c == '(' || c == ')')
return (0);
if (c == '*' || c == '/' || c == '%')
return (1);
if (c == '+' || c == '-')
return (2);
return (0);
}