-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.h
More file actions
146 lines (102 loc) · 1.99 KB
/
main.h
File metadata and controls
146 lines (102 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef _MAIN_H_
#define _MAIN_H_
/**
* _putchar - writes to standard output
*
* @c: character to compare
*
* Return: 1 or 0
*/
int _putchar(char c);
/**
* print_alphabet - func to print alphabet in lowercase
*/
void print_alphabet(void);
/**
* print_alphabet_x10 - func to print lowercase alphabets 10x
*/
void print_alphabet_x10(void);
/**
* _islower - function checking for a lowercase character
*
* Return: 1 if islower or 0
*/
int _islower(int c);
/**
* _isalpha - checks if char is an alphabet
*
* Return: 1 if isalpha, 0 otherwise
*/
int _isalpha(int c);
/**
* print_sign - func to print sign of a number
*
* Return: 1 if positive, -1 if negative, 0 if 0
*/
int print_sign(int n);
/**
* _abs - computes absolute value of an int
*/
int _abs(int);
/**
* print_last_digit - prints last digit of a number
*
*Return: value of last digit
*/
int print_last_digit(int n);
/**
* jack_bauer - prints timer
*
*/
int jack_bauer(void);
/**
* times_table - prints the 9 times table
*/
void times_table(void);
/**
* add - sums up two integers a & b
*
* Return: sum of two ints a,b
*/
int add(int, int);
/**
* print_to_98 - counts from n to 98
*/
void print_to_98(int n);
/**
* print_times_table - prints n times table
*/
void print_times_table(int n);
/**
* reset_to_98 - takes pointer to an int as parameter and resets the value to 98
*/
void reset_to_98(int *n);
/**
* swap_int - swaps values of two integers
*/
void swap_int(int *a, int *b);
/**
* _strlen - returns string length
*/
int _strlen(char *s);
/**
* _puts - prints a string to standard output
*/
void _puts(char *str);
/**
* print_rev - prints a string in reverse
*/
void print_rev(char *s);
/**
* rev_string - reverses a string
*/
void rev_string(char *s);
/**
* puts2 - prints every other character of a string, starting with the first character, followed by a new line.
*/
void puts2(char *str);
/**
* puts_half - prints half of a string
*/
void puts_half(char *str);
#endif